Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
bpo-39573: Update Include/* to use Py_IS_TYPE
  • Loading branch information
corona10 committed Feb 14, 2020
commit ed902313b9a1d605b4b3c2f6527090d09d63c481
4 changes: 2 additions & 2 deletions Include/classobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 *);

Expand All @@ -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 *);
Expand Down
2 changes: 1 addition & 1 deletion Include/picklebufobject.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ extern "C" {

PyAPI_DATA(PyTypeObject) PyPickleBuffer_Type;

#define PyPickleBuffer_Check(op) (Py_TYPE(op) == &PyPickleBuffer_Type)
#define PyPickleBuffer_Check(op) Py_IS_TYPE(op, &PyPickleBuffer_Type)

/* Create a PickleBuffer redirecting to the given buffer-enabled object */
PyAPI_FUNC(PyObject *) PyPickleBuffer_FromObject(PyObject *);
Expand Down