Make the Py<type>_Check() macro use PyObject_TypeCheck(). · pythoncapi/cpython@5eef77a · GitHub
Skip to content

Commit 5eef77a

Browse files
committed
Make the Py<type>_Check() macro use PyObject_TypeCheck().
1 parent deb77e8 commit 5eef77a

3 files changed

Lines changed: 3 additions & 3 deletions

File tree

Include/stringobject.h

Lines changed: 1 addition & 1 deletion

Include/tupleobject.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ typedef struct {
2626

2727
extern DL_IMPORT(PyTypeObject) PyTuple_Type;
2828

29-
#define PyTuple_Check(op) ((op)->ob_type == &PyTuple_Type)
29+
#define PyTuple_Check(op) PyObject_TypeCheck(op, &PyTuple_Type)
3030

3131
extern DL_IMPORT(PyObject *) PyTuple_New(int size);
3232
extern DL_IMPORT(int) PyTuple_Size(PyObject *);

Include/unicodeobject.h

Lines changed: 1 addition & 1 deletion

0 commit comments

Comments
 (0)