mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Fixed ref count bug. Patch #411191. Found by Walter Dörwald.
This commit is contained in:
parent
4113b137cd
commit
ae605341e3
1 changed files with 3 additions and 1 deletions
|
@ -346,8 +346,10 @@ PyObject_Unicode(PyObject *v)
|
||||||
Py_INCREF(v);
|
Py_INCREF(v);
|
||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
else if (PyString_Check(v))
|
else if (PyString_Check(v)) {
|
||||||
|
Py_INCREF(v);
|
||||||
res = v;
|
res = v;
|
||||||
|
}
|
||||||
else if (v->ob_type->tp_str != NULL)
|
else if (v->ob_type->tp_str != NULL)
|
||||||
res = (*v->ob_type->tp_str)(v);
|
res = (*v->ob_type->tp_str)(v);
|
||||||
else {
|
else {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue