mirror of
https://github.com/python/cpython.git
synced 2025-10-17 12:18:23 +00:00
Add a missing Py_DECREF to BaseException__unicode__ .
This commit is contained in:
parent
5bde08dba3
commit
46872b1613
1 changed files with 8 additions and 2 deletions
|
@ -285,16 +285,22 @@ BaseException__unicode__(PyObject *self, PyObject *args)
|
||||||
}
|
}
|
||||||
else if (args_len == 1) {
|
else if (args_len == 1) {
|
||||||
PyObject *temp = PySequence_GetItem(args, 0);
|
PyObject *temp = PySequence_GetItem(args, 0);
|
||||||
|
PyObject *unicode_obj;
|
||||||
|
|
||||||
if (!temp) {
|
if (!temp) {
|
||||||
Py_DECREF(args);
|
Py_DECREF(args);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
Py_DECREF(args);
|
Py_DECREF(args);
|
||||||
return PyObject_Unicode(temp);
|
unicode_obj = PyObject_Unicode(temp);
|
||||||
|
Py_DECREF(temp);
|
||||||
|
return unicode_obj;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
PyObject *unicode_obj = PyObject_Unicode(args);
|
||||||
|
|
||||||
Py_DECREF(args);
|
Py_DECREF(args);
|
||||||
return PyObject_Unicode(args);
|
return unicode_obj;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif /* Py_USING_UNICODE */
|
#endif /* Py_USING_UNICODE */
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue