diff options
Diffstat (limited to 'Python')
-rw-r--r-- | Python/ceval.c | 5 | ||||
-rw-r--r-- | Python/modsupport.c | 3 |
2 files changed, 5 insertions, 3 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index d79a239704..7747b084f0 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -10,6 +10,7 @@ #define PY_LOCAL_AGGRESSIVE #include "Python.h" +#include "pycore_abstract.h" // _PyIndex_Check() #include "pycore_call.h" #include "pycore_ceval.h" #include "pycore_code.h" @@ -5089,7 +5090,7 @@ _PyEval_SliceIndex(PyObject *v, Py_ssize_t *pi) PyThreadState *tstate = _PyThreadState_GET(); if (v != Py_None) { Py_ssize_t x; - if (PyIndex_Check(v)) { + if (_PyIndex_Check(v)) { x = PyNumber_AsSsize_t(v, NULL); if (x == -1 && _PyErr_Occurred(tstate)) return 0; @@ -5110,7 +5111,7 @@ _PyEval_SliceIndexNotNone(PyObject *v, Py_ssize_t *pi) { PyThreadState *tstate = _PyThreadState_GET(); Py_ssize_t x; - if (PyIndex_Check(v)) { + if (_PyIndex_Check(v)) { x = PyNumber_AsSsize_t(v, NULL); if (x == -1 && _PyErr_Occurred(tstate)) return 0; diff --git a/Python/modsupport.c b/Python/modsupport.c index a8e78c3cec..845bdcb2b6 100644 --- a/Python/modsupport.c +++ b/Python/modsupport.c @@ -2,6 +2,7 @@ /* Module support implementation */ #include "Python.h" +#include "pycore_abstract.h" // _PyIndex_Check() #define FLAG_SIZE_T 1 typedef double va_double; @@ -20,7 +21,7 @@ _Py_convert_optional_to_ssize_t(PyObject *obj, void *result) if (obj == Py_None) { return 1; } - else if (PyIndex_Check(obj)) { + else if (_PyIndex_Check(obj)) { limit = PyNumber_AsSsize_t(obj, PyExc_OverflowError); if (limit == -1 && PyErr_Occurred()) { return 0; |