Skip to content

Commit 41dd751

Browse files
authored
Merge pull request #30712 from charris/backport-30705
MAINT: replace ob_type access with Py_TYPE in PyArray_CheckExact
2 parents cc635b3 + 2943d07 commit 41dd751

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

numpy/_core/include/numpy/ndarrayobject.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ extern "C" {
3232
#define PyArray_DescrCheck(op) PyObject_TypeCheck(op, &PyArrayDescr_Type)
3333

3434
#define PyArray_Check(op) PyObject_TypeCheck(op, &PyArray_Type)
35-
#define PyArray_CheckExact(op) (((PyObject*)(op))->ob_type == &PyArray_Type)
35+
#define PyArray_CheckExact(op) (Py_TYPE((PyObject*)(op)) == &PyArray_Type)
3636

3737
#define PyArray_HasArrayInterfaceType(op, type, context, out) \
3838
((((out)=PyArray_FromStructInterface(op)) != Py_NotImplemented) || \

0 commit comments

Comments
 (0)