From 3980d381f7ad44b14483dc90c0f6f0a36804c290 Mon Sep 17 00:00:00 2001 From: INADA Naoki Date: Tue, 26 Oct 2010 01:32:08 +0900 Subject: Remove unnecessary refcount manipulation. --- msgpack/_msgpack.pyx | 4 ---- 1 file changed, 4 deletions(-) (limited to 'msgpack/_msgpack.pyx') 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 = 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: -- cgit v1.2.1