summaryrefslogtreecommitdiffstats
path: root/Include/bufferobject.h
diff options
context:
space:
mode:
Diffstat (limited to 'Include/bufferobject.h')
-rw-r--r--Include/bufferobject.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Include/bufferobject.h b/Include/bufferobject.h
index 75ba496..639b08d 100644
--- a/Include/bufferobject.h
+++ b/Include/bufferobject.h
@@ -12,7 +12,7 @@ extern "C" {
PyAPI_DATA(PyTypeObject) PyBuffer_Type;
-#define PyBuffer_Check(op) ((op)->ob_type == &PyBuffer_Type)
+#define PyBuffer_Check(op) (Py_Type(op) == &PyBuffer_Type)
#define Py_END_OF_BUFFER (-1)