diff options
author | Guido van Rossum <guido@python.org> | 2001-12-06 14:09:56 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2001-12-06 14:09:56 (GMT) |
commit | 2556f2e1e251097818dd428cc22f0633bd9ba162 (patch) | |
tree | cd21c464d76e3d50f5dcdf03ec0df42e848381a8 | |
parent | 3caca2326e04ea3c0d1f8c6a588e646d8201af38 (diff) | |
download | cpython-2556f2e1e251097818dd428cc22f0633bd9ba162.zip cpython-2556f2e1e251097818dd428cc22f0633bd9ba162.tar.gz cpython-2556f2e1e251097818dd428cc22f0633bd9ba162.tar.bz2 |
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).
-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__"); |