diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2018-07-31 09:09:36 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-31 09:09:36 +0300 |
commit | 48c8bf21f97aeb124dbd48bf2bdec1ab4ebc5202 (patch) | |
tree | 6678ae7f56e368ef192b8e0f5988f7c317dbb246 /Include | |
parent | dc9039da239ee572eaaf56e4a026be1fc4d74e24 (diff) | |
download | cpython-git-48c8bf21f97aeb124dbd48bf2bdec1ab4ebc5202.tar.gz |
[2.7] bpo-34234: Use _PyAnyInt_Check() and _PyAnyInt_CheckExact(). (GH-8479)
Diffstat (limited to 'Include')
-rw-r--r-- | Include/intobject.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Include/intobject.h b/Include/intobject.h index 59d061629e..d1985748b3 100644 --- a/Include/intobject.h +++ b/Include/intobject.h @@ -31,6 +31,9 @@ PyAPI_DATA(PyTypeObject) PyInt_Type; PyType_FastSubclass(Py_TYPE(op), Py_TPFLAGS_INT_SUBCLASS) #define PyInt_CheckExact(op) (Py_TYPE(op) == &PyInt_Type) +#define _PyAnyInt_Check(op) (PyInt_Check(op) || PyLong_Check(op)) +#define _PyAnyInt_CheckExact(op) (PyInt_CheckExact(op) || PyLong_CheckExact(op)) + PyAPI_FUNC(PyObject *) PyInt_FromString(char*, char**, int); #ifdef Py_USING_UNICODE PyAPI_FUNC(PyObject *) PyInt_FromUnicode(Py_UNICODE*, Py_ssize_t, int); |