diff options
author | Dong-hee Na <donghee.na92@gmail.com> | 2020-02-14 07:48:12 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-14 07:48:12 (GMT) |
commit | d212c3c55d414203b0579e000d9f340f8cd11be7 (patch) | |
tree | 2463da9024a411c08bb2109674a612915da69b93 /Include/classobject.h | |
parent | 7386a70746cf9aaf2d95db75d9201fb124f085df (diff) | |
download | cpython-d212c3c55d414203b0579e000d9f340f8cd11be7.zip cpython-d212c3c55d414203b0579e000d9f340f8cd11be7.tar.gz cpython-d212c3c55d414203b0579e000d9f340f8cd11be7.tar.bz2 |
bpo-39573: PyXXX_Check() macros use Py_IS_TYPE() (GH-18508)
Update PyXXX_Check() macros in Include/ to use
the new Py_IS_TYPE function.
Diffstat (limited to 'Include/classobject.h')
-rw-r--r-- | Include/classobject.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Include/classobject.h b/Include/classobject.h index 8742720..1952f67 100644 --- a/Include/classobject.h +++ b/Include/classobject.h @@ -19,7 +19,7 @@ typedef struct { PyAPI_DATA(PyTypeObject) PyMethod_Type; -#define PyMethod_Check(op) (Py_TYPE(op)== &PyMethod_Type) +#define PyMethod_Check(op) Py_IS_TYPE(op, &PyMethod_Type) PyAPI_FUNC(PyObject *) PyMethod_New(PyObject *, PyObject *); @@ -40,7 +40,7 @@ typedef struct { PyAPI_DATA(PyTypeObject) PyInstanceMethod_Type; -#define PyInstanceMethod_Check(op) (Py_TYPE(op) == &PyInstanceMethod_Type) +#define PyInstanceMethod_Check(op) Py_IS_TYPE(op, &PyInstanceMethod_Type) PyAPI_FUNC(PyObject *) PyInstanceMethod_New(PyObject *); PyAPI_FUNC(PyObject *) PyInstanceMethod_Function(PyObject *); |