fix ref-leak in Py2 metaclass support
authorStefan Behnel <scoder@users.berlios.de>
Wed, 3 Nov 2010 20:44:55 +0000 (21:44 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Wed, 3 Nov 2010 20:44:55 +0000 (21:44 +0100)
Cython/Compiler/ExprNodes.py

index af17c28f415b04bb5fdade71775f1216bc65d515..0bb334ded275918c66c9c8dc919eede9bd4ced18 100755 (executable)
@@ -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);