diff options
author | Steeve Morin <steeve.morin@gmail.com> | 2012-06-16 13:56:46 +0300 |
---|---|---|
committer | Steeve Morin <steeve.morin@gmail.com> | 2012-06-16 13:56:46 +0300 |
commit | 07506667c98f51bf46b47116f9afed8fa5f381e0 (patch) | |
tree | 94f6709db16f12303d02171d7586ac958e5a0c1c /msgpack/_msgpack.pyx | |
parent | 7a4af28fa1599f49cc0a27c66beecd5e4474dcbe (diff) | |
download | msgpack-python-07506667c98f51bf46b47116f9afed8fa5f381e0.tar.gz |
Make sure objects inherited from Dict are properly casted (or else Cython will complain and crash).
Diffstat (limited to 'msgpack/_msgpack.pyx')
-rw-r--r-- | msgpack/_msgpack.pyx | 2 |
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(): |