mirror of
https://github.com/msgpack/msgpack-python.git
synced 2025-10-26 15:14:10 +00:00
Merge pull request #8 from steeve/patch-1
Make sure objects inherited from Dict are properly casted
This commit is contained in:
commit
b95ea1467f
1 changed files with 1 additions and 1 deletions
|
|
@ -128,7 +128,7 @@ cdef class Packer(object):
|
||||||
if ret == 0:
|
if ret == 0:
|
||||||
ret = msgpack_pack_raw_body(&self.pk, rawval, len(o))
|
ret = msgpack_pack_raw_body(&self.pk, rawval, len(o))
|
||||||
elif PyDict_Check(o):
|
elif PyDict_Check(o):
|
||||||
d = o
|
d = <dict>o
|
||||||
ret = msgpack_pack_map(&self.pk, len(d))
|
ret = msgpack_pack_map(&self.pk, len(d))
|
||||||
if ret == 0:
|
if ret == 0:
|
||||||
for k,v in d.iteritems():
|
for k,v in d.iteritems():
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue