Commit 4d3030b3 authored by Stefan Behnel's avatar Stefan Behnel

fix ref-leak in Py2 metaclass support

parent 8ee0c69f
...@@ -7187,6 +7187,7 @@ static PyObject *__Pyx_CreateClass( ...@@ -7187,6 +7187,7 @@ static PyObject *__Pyx_CreateClass(
} }
result = PyObject_CallFunctionObjArgs(metaclass, name, bases, methods, NULL); result = PyObject_CallFunctionObjArgs(metaclass, name, bases, methods, NULL);
Py_DECREF(metaclass);
#else #else
/* it seems that python3+ handle __metaclass__ itself */ /* it seems that python3+ handle __metaclass__ itself */
result = PyObject_CallFunctionObjArgs((PyObject *)&PyType_Type, name, bases, methods, NULL); result = PyObject_CallFunctionObjArgs((PyObject *)&PyType_Type, name, bases, methods, NULL);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment