diff options
author | Guido van Rossum <guido@python.org> | 1999-10-11 14:03:12 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1999-10-11 14:03:12 (GMT) |
commit | 42636dc64d098ab034980e7c3e2bb2e056db3fb7 (patch) | |
tree | 7214a8bd428b6bb2ab23d574461f58090ee788a7 | |
parent | 08a92cb56874537b88a224e9fcd6a3d89a5a703b (diff) | |
download | cpython-42636dc64d098ab034980e7c3e2bb2e056db3fb7.zip cpython-42636dc64d098ab034980e7c3e2bb2e056db3fb7.tar.gz cpython-42636dc64d098ab034980e7c3e2bb2e056db3fb7.tar.bz2 |
Fix for PR#98 (Adrian Eyre) -- in instancemethod_repr, the funcname
object is DECREFed too early.
-rw-r--r-- | Objects/classobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/classobject.c b/Objects/classobject.c index 305c07e..6d49228 100644 --- a/Objects/classobject.c +++ b/Objects/classobject.c @@ -1559,7 +1559,6 @@ instancemethod_repr(a) fname = PyString_AS_STRING(funcname); else fname = "?"; - Py_XDECREF(funcname); if (fclassname != NULL && PyString_Check(fclassname)) fcname = PyString_AsString(fclassname); else @@ -1575,6 +1574,7 @@ instancemethod_repr(a) sprintf(buf, "<method %.60s.%.60s of %.60s instance at %lx>", fcname, fname, icname, (long)self); } + Py_XDECREF(funcname); return PyString_FromString(buf); } |