• Kirill Smelkov's avatar
    encoder: Fix dict wrt protocol version · bb7b117b
    Kirill Smelkov authored
    - we can use EMPTY_DICT only if protocol >= 1
    
    Also: similarly to list (33d1926f), since we are now using EMPTY_DICT
    only optionally, it is logical to swit to
    
    	MARK + ... + DICT
    
    from
    
    	EMPTY_DICT (or MARK + DICT @proto=0) + MARK + ... + SETITEMS
    
    which is at least 1 byte longer.
    
    For the reference - SETITEMS is also from protocol 1, while DICT is from
    protocol 0.
    bb7b117b
ogorek_test.go 29.9 KB