diff options
author | Naoki INADA <inada-n@gear> | 2009-06-08 12:46:02 +0900 |
---|---|---|
committer | Naoki INADA <inada-n@gear> | 2009-06-08 12:46:02 +0900 |
commit | 560bd901f83c9024ed88b738b80e14de337847c5 (patch) | |
tree | ccefabc3f6ab9197998cbedb92c6f8a27c2db0b3 /python/msgpack.pyx | |
parent | 1840ef70aef0cfc9b6594ca7f24f6497eec7d13f (diff) | |
download | msgpack-python-560bd901f83c9024ed88b738b80e14de337847c5.tar.gz |
Fix double INCREF-ing when unpacking.
Diffstat (limited to 'python/msgpack.pyx')
-rw-r--r-- | python/msgpack.pyx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/python/msgpack.pyx b/python/msgpack.pyx index c454c5d..8b2006a 100644 --- a/python/msgpack.pyx +++ b/python/msgpack.pyx @@ -173,7 +173,7 @@ cdef extern from "unpack.h": int template_execute(template_context* ctx, const_char_ptr data, size_t len, size_t* off) void template_init(template_context* ctx) - PyObject* template_data(template_context* ctx) + object template_data(template_context* ctx) def unpacks(object packed_bytes): @@ -183,7 +183,7 @@ def unpacks(object packed_bytes): cdef size_t off = 0 template_init(&ctx) template_execute(&ctx, p, len(packed_bytes), &off) - return <object> template_data(&ctx) + return template_data(&ctx) def unpack(object stream): """unpack from stream.""" |