Commit 144a60dc authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent d4d1704c
...@@ -462,7 +462,7 @@ func (zl *zLink) xuint64Pack(v uint64) interface{} { ...@@ -462,7 +462,7 @@ func (zl *zLink) xuint64Pack(v uint64) interface{} {
panic("bug") panic("bug")
case 'Z': case 'Z':
// pickle: -> str XXX do we need to emit bytes for py3? // pickle: -> str XXX do we need to emit bytes for py3? -> TODO yes, after switch to protocol=3
return mem.String(b[:]) return mem.String(b[:])
case 'M': case 'M':
...@@ -541,8 +541,14 @@ func (zl *zLink) asString(xs interface{}) (string, bool) { ...@@ -541,8 +541,14 @@ func (zl *zLink) asString(xs interface{}) (string, bool) {
return s, ok return s, ok
case 'M': case 'M':
// msgpack: bin XXX ZEO/py sends strings as bin // msgpack: bin(from py2) | str(from py3)
b, ok := xs.([]byte) switch s := xs.(type) {
return string(b), ok case []byte:
return string(s), true
case string:
return s, true
default:
return "", false
}
} }
} }
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment