From: Stefan Behnel Date: Wed, 3 Nov 2010 20:44:55 +0000 (+0100) Subject: fix ref-leak in Py2 metaclass support X-Git-Tag: 0.14.alpha0~234 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4d3030b36c61f2be009916281c32d2868e9d61e5;p=cython.git fix ref-leak in Py2 metaclass support --- diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py index af17c28f..0bb334de 100755 --- a/Cython/Compiler/ExprNodes.py +++ b/Cython/Compiler/ExprNodes.py @@ -7187,6 +7187,7 @@ static PyObject *__Pyx_CreateClass( } result = PyObject_CallFunctionObjArgs(metaclass, name, bases, methods, NULL); + Py_DECREF(metaclass); #else /* it seems that python3+ handle __metaclass__ itself */ result = PyObject_CallFunctionObjArgs((PyObject *)&PyType_Type, name, bases, methods, NULL);