diff options
author | INADA Naoki <inada-n@klab.com> | 2013-10-21 00:59:22 +0900 |
---|---|---|
committer | INADA Naoki <inada-n@klab.com> | 2013-10-21 00:59:22 +0900 |
commit | e3fee4db5fbf1ead4a98fff6c8843574480c3c2a (patch) | |
tree | 1cff58d64577660b7d632806a67b798716c37854 /msgpack/_packer.pyx | |
parent | 37c2ad63af8a6e5cb6944f80d931fedbc6b49e7d (diff) | |
download | msgpack-python-e3fee4db5fbf1ead4a98fff6c8843574480c3c2a.tar.gz |
fallback: support packing ExtType
Diffstat (limited to 'msgpack/_packer.pyx')
-rw-r--r-- | msgpack/_packer.pyx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/msgpack/_packer.pyx b/msgpack/_packer.pyx index f63667c..f2d058e 100644 --- a/msgpack/_packer.pyx +++ b/msgpack/_packer.pyx @@ -37,7 +37,6 @@ cdef extern from "pack.h": cdef int DEFAULT_RECURSE_LIMIT=511 - cdef class Packer(object): """ MessagePack Packer @@ -185,8 +184,8 @@ cdef class Packer(object): if ret != 0: break elif isinstance(o, ExtType): # This should be before Tuple because ExtType is namedtuple. - longval = o[0] - rawval = o[1] + longval = o.code + rawval = o.data L = len(o[1]) ret = msgpack_pack_ext(&self.pk, longval, L) ret = msgpack_pack_raw_body(&self.pk, rawval, L) |