File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ typedef struct {
19
19
20
20
PyAPI_DATA (PyTypeObject ) PyMethod_Type ;
21
21
22
- #define PyMethod_Check (op ) (Py_TYPE(op)== &PyMethod_Type)
22
+ #define PyMethod_Check (op ) Py_IS_TYPE(op, &PyMethod_Type)
23
23
24
24
PyAPI_FUNC (PyObject * ) PyMethod_New (PyObject * , PyObject * );
25
25
@@ -40,7 +40,7 @@ typedef struct {
40
40
41
41
PyAPI_DATA (PyTypeObject ) PyInstanceMethod_Type ;
42
42
43
- #define PyInstanceMethod_Check (op ) (Py_TYPE(op) == &PyInstanceMethod_Type)
43
+ #define PyInstanceMethod_Check (op ) Py_IS_TYPE(op, &PyInstanceMethod_Type)
44
44
45
45
PyAPI_FUNC (PyObject * ) PyInstanceMethod_New (PyObject * );
46
46
PyAPI_FUNC (PyObject * ) PyInstanceMethod_Function (PyObject * );
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ extern "C" {
12
12
13
13
PyAPI_DATA (PyTypeObject ) PyPickleBuffer_Type ;
14
14
15
- #define PyPickleBuffer_Check (op ) (Py_TYPE(op) == &PyPickleBuffer_Type)
15
+ #define PyPickleBuffer_Check (op ) Py_IS_TYPE(op, &PyPickleBuffer_Type)
16
16
17
17
/* Create a PickleBuffer redirecting to the given buffer-enabled object */
18
18
PyAPI_FUNC (PyObject * ) PyPickleBuffer_FromObject (PyObject * );
You can’t perform that action at this time.
0 commit comments