Skip to content

Commit

Permalink
Replace o->ob_type with Py_TYPE(o)
Browse files Browse the repository at this point in the history
  • Loading branch information
stephan-hof committed Feb 2, 2017
1 parent dcc6686 commit 3bcad0a
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/ExtensionClass/ExtensionClass.h
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ static struct ExtensionClassCAPIstruct {

/* The following macro checks whether an instance is an extension instance: */
#define PyExtensionInstance_Check(INST) \
PyObject_TypeCheck(((PyObject*)(INST))->ob_type, ECExtensionClassType)
PyObject_TypeCheck(Py_TYPE(INST), ECExtensionClassType)

#define CHECK_FOR_ERRORS(MESS)

Expand Down Expand Up @@ -254,9 +254,9 @@ static PyExtensionClass NAME ## Type = { PyVarObject_HEAD_INIT(NULL, 0) # NAME,
#undef PyObject_DEL

#define PyMem_DEL(O) \
if (((O)->ob_type->tp_flags & Py_TPFLAGS_HAVE_CLASS) \
&& ((O)->ob_type->tp_free != NULL)) \
(O)->ob_type->tp_free((PyObject*)(O)); \
if ((Py_TYPE(O)->tp_flags & Py_TPFLAGS_HAVE_CLASS) \
&& (Py_TYPE(O)->tp_free != NULL)) \
Py_TYPE(O)->tp_free((PyObject*)(O)); \
else \
PyObject_FREE((O));

Expand Down

0 comments on commit 3bcad0a

Please sign in to comment.