Commit 6a3f1385 authored by Marc-André Lemburg's avatar Marc-André Lemburg

Fixed ref count bug. Patch #411191. Found by Walter Dörwald.

parent ca6d7024
......@@ -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 {
......
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