mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +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
|
@ -42,7 +42,7 @@ typedef struct {
|
|||
|
||||
extern DL_IMPORT(PyTypeObject) PyComplex_Type;
|
||||
|
||||
#define PyComplex_Check(op) ((op)->ob_type == &PyComplex_Type)
|
||||
#define PyComplex_Check(op) PyObject_TypeCheck(op, &PyComplex_Type)
|
||||
|
||||
extern DL_IMPORT(PyObject *) PyComplex_FromCComplex(Py_complex);
|
||||
extern DL_IMPORT(PyObject *) PyComplex_FromDoubles(double real, double imag);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue