mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +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
|
@ -10,6 +10,7 @@
|
|||
|
||||
#define PY_SSIZE_T_CLEAN
|
||||
#include "Python.h"
|
||||
#include "pycore_long.h" // _PyLong_GetOne()
|
||||
#include "pycore_object.h"
|
||||
#include <stddef.h> // offsetof()
|
||||
#include "_iomodule.h"
|
||||
|
@ -556,7 +557,7 @@ _io__IOBase_readline_impl(PyObject *self, Py_ssize_t limit)
|
|||
PyObject *b;
|
||||
|
||||
if (peek != NULL) {
|
||||
PyObject *readahead = PyObject_CallOneArg(peek, _PyLong_One);
|
||||
PyObject *readahead = PyObject_CallOneArg(peek, _PyLong_GetOne());
|
||||
if (readahead == NULL) {
|
||||
/* NOTE: PyErr_SetFromErrno() calls PyErr_CheckSignals()
|
||||
when EINTR occurs so we needn't do it ourselves. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue