diff options
author | Victor Stinner <vstinner@python.org> | 2020-10-27 01:24:34 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-27 01:24:34 (GMT) |
commit | c9bc290dd6e3994a4ead2a224178bcba86f0c0e4 (patch) | |
tree | f3a4e137da850af0438119da460877c3a4fd8532 /Objects/enumobject.c | |
parent | 303aac8c56609290e122eecc14c038e9b1e4174a (diff) | |
download | cpython-c9bc290dd6e3994a4ead2a224178bcba86f0c0e4.zip cpython-c9bc290dd6e3994a4ead2a224178bcba86f0c0e4.tar.gz cpython-c9bc290dd6e3994a4ead2a224178bcba86f0c0e4.tar.bz2 |
bpo-42161: Use _PyLong_GetZero() and _PyLong_GetOne() (GH-22995)
Use _PyLong_GetZero() and _PyLong_GetOne()
in Objects/ and Python/ directories.
Diffstat (limited to 'Objects/enumobject.c')
-rw-r--r-- | Objects/enumobject.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Objects/enumobject.c b/Objects/enumobject.c index 9d8449b..8b5e7d3 100644 --- a/Objects/enumobject.c +++ b/Objects/enumobject.c @@ -1,6 +1,7 @@ /* enumerate object */ #include "Python.h" +#include "pycore_long.h" // _PyLong_GetOne() #include "clinic/enumobject.c.h" @@ -115,7 +116,7 @@ enum_next_long(enumobject *en, PyObject* next_item) } next_index = en->en_longindex; assert(next_index != NULL); - stepped_up = PyNumber_Add(next_index, _PyLong_One); + stepped_up = PyNumber_Add(next_index, _PyLong_GetOne()); if (stepped_up == NULL) { Py_DECREF(next_item); return NULL; |