summaryrefslogtreecommitdiffstats
path: root/Modules/_functoolsmodule.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2020-10-27 16:12:53 (GMT)
committerGitHub <noreply@github.com>2020-10-27 16:12:53 (GMT)
commit37834136d0afe51d274bfc79d8705514cbe73727 (patch)
tree0e4c6b1f42813363f690e7ad179874d727d2cd79 /Modules/_functoolsmodule.c
parenta6879d9445f98833c4e300e187956e2a218a2315 (diff)
downloadcpython-37834136d0afe51d274bfc79d8705514cbe73727.zip
cpython-37834136d0afe51d274bfc79d8705514cbe73727.tar.gz
cpython-37834136d0afe51d274bfc79d8705514cbe73727.tar.bz2
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.
Diffstat (limited to 'Modules/_functoolsmodule.c')
-rw-r--r--Modules/_functoolsmodule.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Modules/_functoolsmodule.c b/Modules/_functoolsmodule.c
index bb86fe8..9fad21f 100644
--- a/Modules/_functoolsmodule.c
+++ b/Modules/_functoolsmodule.c
@@ -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;
}