Kaydet (Commit) 42636dc6 authored tarafından Guido van Rossum's avatar Guido van Rossum

Fix for PR#98 (Adrian Eyre) -- in instancemethod_repr, the funcname

object is DECREFed too early.
üst 08a92cb5
......@@ -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);
}
......
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