GH-103906: Remove immortal refcounting in the interpreter (GH-103909)

This commit is contained in:
Brandt Bucher 2023-05-16 14:36:02 -07:00 committed by GitHub
parent 3a4c44bb1e
commit b4a9747923
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 476 additions and 516 deletions

View file

@ -20,13 +20,7 @@ bool_repr(PyObject *self)
PyObject *PyBool_FromLong(long ok)
{
PyObject *result;
if (ok)
result = Py_True;
else
result = Py_False;
return Py_NewRef(result);
return ok ? Py_True : Py_False;
}
/* We define bool_new to always return either Py_True or Py_False */