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 /Python/_warnings.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 'Python/_warnings.c')
-rw-r--r-- | Python/_warnings.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Python/_warnings.c b/Python/_warnings.c index 86bbfa1..271cd47 100644 --- a/Python/_warnings.c +++ b/Python/_warnings.c @@ -1,6 +1,7 @@ #include "Python.h" #include "pycore_initconfig.h" #include "pycore_interp.h" // PyInterpreterState.warnings +#include "pycore_long.h" // _PyLong_GetZero() #include "pycore_pyerrors.h" #include "pycore_pystate.h" // _PyThreadState_GET() #include "frameobject.h" // PyFrame_GetBack() @@ -73,7 +74,7 @@ create_filter(PyObject *category, _Py_Identifier *id, const char *modname) /* This assumes the line number is zero for now. */ return PyTuple_Pack(5, action_str, Py_None, - category, modname_obj, _PyLong_Zero); + category, modname_obj, _PyLong_GetZero()); } #endif @@ -472,7 +473,7 @@ update_registry(PyObject *registry, PyObject *text, PyObject *category, int rc; if (add_zero) - altkey = PyTuple_Pack(3, text, category, _PyLong_Zero); + altkey = PyTuple_Pack(3, text, category, _PyLong_GetZero()); else altkey = PyTuple_Pack(2, text, category); |