mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
GH-103906: Remove immortal refcounting in the interpreter (GH-103909)
This commit is contained in:
parent
3a4c44bb1e
commit
b4a9747923
4 changed files with 476 additions and 516 deletions
|
|
@ -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 */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue