From 7c573fe30631c136485c01517409206cb7da0965 Mon Sep 17 00:00:00 2001 From: Graham Dumpleton Date: Thu, 19 Sep 2013 22:19:28 +1000 Subject: [PATCH] Incorrect increment of reference count on persistent type object. --- src/_wrappers.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/_wrappers.c b/src/_wrappers.c index 16f8c5b..e703019 100644 --- a/src/_wrappers.c +++ b/src/_wrappers.c @@ -2054,13 +2054,10 @@ static int WraptFunctionWrapper_init(WraptFunctionWrapperObject *self, if (PyObject_IsInstance(wrapped, (PyObject *)&PyClassMethod_Type) || PyObject_IsInstance( wrapped, (PyObject *)&PyStaticMethod_Type)) { - Py_INCREF((PyObject *)&WraptBoundFunctionWrapper_Type); bound_type = (PyObject *)&WraptBoundFunctionWrapper_Type; } - else { - Py_INCREF((PyObject *)&WraptBoundMethodWrapper_Type); + else bound_type = (PyObject *)&WraptBoundMethodWrapper_Type; - } result = WraptFunctionWrapperBase_raw_init(self, wrapped, Py_None, wrapper, adapter, bound_type);