PEP 3123: Provide forward compatibility with Python 3.0, while keeping
backwards compatibility. Add Py_Refcnt, Py_Type, Py_Size, and
PyVarObject_HEAD_INIT.
diff --git a/Include/methodobject.h b/Include/methodobject.h
index c887d94..511a747 100644
--- a/Include/methodobject.h
+++ b/Include/methodobject.h
@@ -13,7 +13,7 @@
 
 PyAPI_DATA(PyTypeObject) PyCFunction_Type;
 
-#define PyCFunction_Check(op) ((op)->ob_type == &PyCFunction_Type)
+#define PyCFunction_Check(op) (Py_Type(op) == &PyCFunction_Type)
 
 typedef PyObject *(*PyCFunction)(PyObject *, PyObject *);
 typedef PyObject *(*PyCFunctionWithKeywords)(PyObject *, PyObject *,