Mercurial > cpython-lru_cache-weakref
diff Python/ceval.c @ 21252:e386f6e26a42 legacy-trunk
Fix a typo (probably caused by autocompletion <blush>) that caused a
leak when a class defined a __metaclass__. This fixes the problem
reported on python-dev by Ping; I dunno if it's the same as SF bug
#489669 (since that mentions Unicode).
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Thu, 06 Dec 2001 14:09:56 +0000 |
| parents | 45e1177424e1 |
| children | 97709fd8fda0 |
line wrap: on
line diff
--- a/Python/ceval.c Thu Dec 06 06:23:26 2001 +0000 +++ b/Python/ceval.c Thu Dec 06 14:09:56 2001 +0000 @@ -3554,7 +3554,7 @@ 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__");
