summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorINADA Naoki <songofacandy@gmail.com>2012-06-18 21:34:26 -0700
committerINADA Naoki <songofacandy@gmail.com>2012-06-18 21:34:26 -0700
commitb95ea1467f2f4bb80bf1d37b0fccda6937ce43b7 (patch)
tree94f6709db16f12303d02171d7586ac958e5a0c1c
parent7a4af28fa1599f49cc0a27c66beecd5e4474dcbe (diff)
parent07506667c98f51bf46b47116f9afed8fa5f381e0 (diff)
downloadmsgpack-python-b95ea1467f2f4bb80bf1d37b0fccda6937ce43b7.tar.gz
Merge pull request #8 from steeve/patch-1
Make sure objects inherited from Dict are properly casted
-rw-r--r--msgpack/_msgpack.pyx2
1 files changed, 1 insertions, 1 deletions
diff --git a/msgpack/_msgpack.pyx b/msgpack/_msgpack.pyx
index 612dd0f..990f585 100644
--- a/msgpack/_msgpack.pyx
+++ b/msgpack/_msgpack.pyx
@@ -128,7 +128,7 @@ cdef class Packer(object):
if ret == 0:
ret = msgpack_pack_raw_body(&self.pk, rawval, len(o))
elif PyDict_Check(o):
- d = o
+ d = <dict>o
ret = msgpack_pack_map(&self.pk, len(d))
if ret == 0:
for k,v in d.iteritems():