diff options
Diffstat (limited to 'Include')
| -rw-r--r-- | Include/Python.h | 1 | ||||
| -rw-r--r-- | Include/abstract.h | 7 |
2 files changed, 5 insertions, 3 deletions
diff --git a/Include/Python.h b/Include/Python.h index 56d20abe85..763b14484e 100644 --- a/Include/Python.h +++ b/Include/Python.h @@ -90,6 +90,7 @@ #endif #include "rangeobject.h" #include "stringobject.h" +/* #include "memoryobject.h" */ #include "bufferobject.h" #include "tupleobject.h" #include "listobject.h" diff --git a/Include/abstract.h b/Include/abstract.h index 159e67d7f2..3e5cf129f8 100644 --- a/Include/abstract.h +++ b/Include/abstract.h @@ -532,9 +532,10 @@ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx*/ /* new buffer API */ #define PyObject_CheckBuffer(obj) \ - (((obj)->ob_type->tp_as_buffer != NULL) && \ - ((obj)->ob_type->tp_as_buffer->bf_getbuffer != NULL)) - + (((obj)->ob_type->tp_as_buffer != NULL) && \ + (PyType_HasFeature((obj)->ob_type, Py_TPFLAGS_HAVE_NEWBUFFER)) && \ + ((obj)->ob_type->tp_as_buffer->bf_getbuffer != NULL)) + /* Return 1 if the getbuffer function is available, otherwise return 0 */ |
