mirror of
https://github.com/python/cpython.git
synced 2025-07-24 19:54:21 +00:00
Py_IS_TYPE() macro uses Py_TYPE() (GH-22341)
This commit is contained in:
parent
62e40d8450
commit
c5cb077ab3
1 changed files with 1 additions and 1 deletions
|
@ -141,7 +141,7 @@ static inline PyTypeObject* _Py_TYPE(const PyObject *ob) {
|
||||||
|
|
||||||
|
|
||||||
static inline int _Py_IS_TYPE(const PyObject *ob, const PyTypeObject *type) {
|
static inline int _Py_IS_TYPE(const PyObject *ob, const PyTypeObject *type) {
|
||||||
return ob->ob_type == type;
|
return Py_TYPE(ob) == type;
|
||||||
}
|
}
|
||||||
#define Py_IS_TYPE(ob, type) _Py_IS_TYPE(_PyObject_CAST_CONST(ob), type)
|
#define Py_IS_TYPE(ob, type) _Py_IS_TYPE(_PyObject_CAST_CONST(ob), type)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue