Commit 9e4dd249 authored by Levin Zimmermann's avatar Levin Zimmermann

fixup! proto/msgpack: Fix encoding INVALID_{TID,OID}

parent 37dd83e9
...@@ -1011,8 +1011,8 @@ func (e *encoderM) genBasic(path string, typ *types.Basic, userType types.Type) ...@@ -1011,8 +1011,8 @@ func (e *encoderM) genBasic(path string, typ *types.Basic, userType types.Type)
// zodb.Tid and zodb.Oid are encoded as [8]bin or nil // zodb.Tid and zodb.Oid are encoded as [8]bin or nil
if userType == zodbTid || userType == zodbOid { if userType == zodbTid || userType == zodbOid {
e.emit("if %s == %v {", path, INVALID_ID) // INVALID_{TID,OID} => e.emit("if %s == %v {", path, INVALID_ID) // INVALID_{TID,OID} =>
e.emit("data[%v] = msgpack.Nil", e.n) // mnil e.emit("data[%v] = byte(msgpack.Nil)", e.n) // mnil
e.emit("data = data[%v:]", e.n + 1) e.emit("data = data[%v:]", e.n + 1)
e.emit("} else {") e.emit("} else {")
e.emit("data[%v] = byte(msgpack.Bin8)", e.n); e.n++ e.emit("data[%v] = byte(msgpack.Bin8)", e.n); e.n++
......
This diff is collapsed.
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