diff options
-rw-r--r-- | Python/ceval.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index 76424e1..6def422 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -3554,7 +3554,7 @@ build_class(PyObject *methods, PyObject *bases, PyObject *name) if (PyDict_Check(methods)) metaclass = PyDict_GetItemString(methods, "__metaclass__"); if (metaclass != NULL) - Py_INCREF(methods); + Py_INCREF(metaclass); else if (PyTuple_Check(bases) && PyTuple_GET_SIZE(bases) > 0) { base = PyTuple_GET_ITEM(bases, 0); metaclass = PyObject_GetAttrString(base, "__class__"); |