From: Marc-André Lemburg Date: Sun, 25 Mar 2001 19:16:13 +0000 (+0000) Subject: Fixed ref count bug. Patch #411191. Found by Walter Dörwald. X-Git-Tag: v2.1c1~239 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=ae605341e3eb9e6426db07660ac57675ae86e2b6;p=thirdparty%2FPython%2Fcpython.git Fixed ref count bug. Patch #411191. Found by Walter Dörwald. --- diff --git a/Objects/object.c b/Objects/object.c index e1dd470569b0..47907bcb1d7f 100644 --- a/Objects/object.c +++ b/Objects/object.c @@ -346,8 +346,10 @@ PyObject_Unicode(PyObject *v) Py_INCREF(v); return v; } - else if (PyString_Check(v)) + else if (PyString_Check(v)) { + Py_INCREF(v); res = v; + } else if (v->ob_type->tp_str != NULL) res = (*v->ob_type->tp_str)(v); else {