mirror of
https://github.com/AdaCore/cpython.git
synced 2026-02-12 12:57:15 -08:00
Fixed ref count bug. Patch #411191. Found by Walter Dörwald.
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user