From 07506667c98f51bf46b47116f9afed8fa5f381e0 Mon Sep 17 00:00:00 2001 From: Steeve Morin Date: Sat, 16 Jun 2012 13:56:46 +0300 Subject: [PATCH] Make sure objects inherited from Dict are properly casted (or else Cython will complain and crash). --- msgpack/_msgpack.pyx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 = o ret = msgpack_pack_map(&self.pk, len(d)) if ret == 0: for k,v in d.iteritems():