summaryrefslogtreecommitdiff
path: root/msgpack/_msgpack.pyx
diff options
context:
space:
mode:
authorINADA Naoki <songofacandy@gmail.com>2010-10-26 01:32:08 +0900
committerINADA Naoki <songofacandy@gmail.com>2010-10-26 01:32:08 +0900
commit3980d381f7ad44b14483dc90c0f6f0a36804c290 (patch)
tree19c09286ab594c920e55ef9352555ec814e27fcd /msgpack/_msgpack.pyx
parentc355f224dc4293683a426e8620a07724ab0e75ac (diff)
downloadmsgpack-python-3980d381f7ad44b14483dc90c0f6f0a36804c290.tar.gz
Remove unnecessary refcount manipulation.
Diffstat (limited to 'msgpack/_msgpack.pyx')
-rw-r--r--msgpack/_msgpack.pyx4
1 files changed, 0 insertions, 4 deletions
diff --git a/msgpack/_msgpack.pyx b/msgpack/_msgpack.pyx
index fb7f0c1..24e4f8b 100644
--- a/msgpack/_msgpack.pyx
+++ b/msgpack/_msgpack.pyx
@@ -202,12 +202,8 @@ def unpackb(bytes packed_bytes, object object_hook=None):
if object_hook is not None:
if not PyCallable_Check(object_hook):
raise TypeError("object_hook must be a callable.")
- Py_INCREF(object_hook)
ctx.user.object_hook = <PyObject*>object_hook
ret = template_execute(&ctx, p, len(packed_bytes), &off)
- if object_hook is not None:
- pass
- #Py_DECREF(object_hook)
if ret == 1:
return template_data(&ctx)
else: