diff options
Diffstat (limited to 'Include/pyerrors.h')
-rw-r--r-- | Include/pyerrors.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Include/pyerrors.h b/Include/pyerrors.h index 5125a51..3fd133c 100644 --- a/Include/pyerrors.h +++ b/Include/pyerrors.h @@ -54,11 +54,11 @@ PyAPI_FUNC(void) PyException_SetContext(PyObject *, PyObject *); PyType_FastSubclass((PyTypeObject*)(x), Py_TPFLAGS_BASE_EXC_SUBCLASS)) #define PyExceptionInstance_Check(x) \ - PyType_FastSubclass((x)->ob_type, Py_TPFLAGS_BASE_EXC_SUBCLASS) + PyType_FastSubclass(Py_TYPE(x), Py_TPFLAGS_BASE_EXC_SUBCLASS) PyAPI_FUNC(const char *) PyExceptionClass_Name(PyObject *); -#define PyExceptionInstance_Class(x) ((PyObject*)((x)->ob_type)) +#define PyExceptionInstance_Class(x) ((PyObject*)Py_TYPE(x)) /* Predefined exceptions */ |