GH-84436: Skip refcounting for known immortals (GH-107605)

This commit is contained in:
Brandt Bucher
2023-08-04 16:24:50 -07:00
committed by GitHub
parent ec0a0d2bd9
commit 05a824f294
19 changed files with 52 additions and 65 deletions

View File

@@ -13,8 +13,7 @@
static PyObject *
bool_repr(PyObject *self)
{
PyObject *res = self == Py_True ? &_Py_ID(True) : &_Py_ID(False);
return Py_NewRef(res);
return self == Py_True ? &_Py_ID(True) : &_Py_ID(False);
}
/* Function to return a bool from a C long */