mirror of
https://github.com/python/cpython.git
synced 2025-10-17 12:18:23 +00:00
Make the PyXXX_Check() macros for the numeric types inheritance-aware.
This commit is contained in:
parent
c51395d797
commit
c16fcdf533
4 changed files with 4 additions and 4 deletions
|
@ -11,7 +11,7 @@ typedef struct _longobject PyLongObject; /* Revealed in longintrepr.h */
|
|||
|
||||
extern DL_IMPORT(PyTypeObject) PyLong_Type;
|
||||
|
||||
#define PyLong_Check(op) ((op)->ob_type == &PyLong_Type)
|
||||
#define PyLong_Check(op) PyObject_TypeCheck(op, &PyLong_Type)
|
||||
|
||||
extern DL_IMPORT(PyObject *) PyLong_FromLong(long);
|
||||
extern DL_IMPORT(PyObject *) PyLong_FromUnsignedLong(unsigned long);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue