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/fileobject.h b/Include/fileobject.h
index 9fd0646..dde5b8f 100644
--- a/Include/fileobject.h
+++ b/Include/fileobject.h
@@ -30,7 +30,7 @@
PyAPI_DATA(PyTypeObject) PyFile_Type;
#define PyFile_Check(op) PyObject_TypeCheck(op, &PyFile_Type)
-#define PyFile_CheckExact(op) ((op)->ob_type == &PyFile_Type)
+#define PyFile_CheckExact(op) (Py_Type(op) == &PyFile_Type)
PyAPI_FUNC(PyObject *) PyFile_FromString(char *, char *);
PyAPI_FUNC(void) PyFile_SetBufSize(PyObject *, int);