mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
GH-90699: fix ref counting of static immortal strings (gh-94850)
This commit is contained in:
parent
88e4eeba25
commit
1834133e66
3 changed files with 4 additions and 2 deletions
|
@ -9,7 +9,8 @@
|
|||
static PyObject *
|
||||
bool_repr(PyObject *self)
|
||||
{
|
||||
return self == Py_True ? &_Py_ID(True) : &_Py_ID(False);
|
||||
PyObject *res = self == Py_True ? &_Py_ID(True) : &_Py_ID(False);
|
||||
return Py_NewRef(res);
|
||||
}
|
||||
|
||||
/* Function to return a bool from a C long */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue