mirror of
https://github.com/python/cpython.git
synced 2025-11-02 11:08:57 +00:00
bpo-42161: Modules/ uses _PyLong_GetZero() and _PyLong_GetOne() (GH-22998)
Use _PyLong_GetZero() and _PyLong_GetOne() in Modules/ directory. _cursesmodule.c and zoneinfo.c are now built with Py_BUILD_CORE_MODULE macro defined.
This commit is contained in:
parent
a6879d9445
commit
37834136d0
14 changed files with 57 additions and 36 deletions
|
|
@ -1,4 +1,5 @@
|
|||
#include "Python.h"
|
||||
#include "pycore_long.h" // _PyLong_GetZero()
|
||||
#include "pycore_pystate.h" // _PyThreadState_GET()
|
||||
#include "pycore_tuple.h" // _PyTuple_ITEMS()
|
||||
#include "structmember.h" // PyMemberDef
|
||||
|
|
@ -596,7 +597,7 @@ keyobject_richcompare(PyObject *ko, PyObject *other, int op)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
answer = PyObject_RichCompare(res, _PyLong_Zero, op);
|
||||
answer = PyObject_RichCompare(res, _PyLong_GetZero(), op);
|
||||
Py_DECREF(res);
|
||||
return answer;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue