missed a few PY_VERSION_HEX checks for buffer interface support

This commit is contained in:
rdb 2013-10-29 17:42:58 +00:00
parent 4a91704958
commit ea126d3175

View File

@ -238,8 +238,10 @@ public:
INLINE bool node_unref() const; INLINE bool node_unref() const;
#ifdef HAVE_PYTHON #ifdef HAVE_PYTHON
#if PY_VERSION_HEX >= 0x02060000
int __getbuffer__(PyObject *self, Py_buffer *view, int flags); int __getbuffer__(PyObject *self, Py_buffer *view, int flags);
void __releasebuffer__(PyObject *self, Py_buffer *view) const; void __releasebuffer__(PyObject *self, Py_buffer *view) const;
#endif
#endif #endif
// Reassignment is by pointer, not memberwise as with a vector. // Reassignment is by pointer, not memberwise as with a vector.
@ -295,9 +297,11 @@ PUBLISHED:
INLINE int get_node_ref_count() const; INLINE int get_node_ref_count() const;
#ifdef HAVE_PYTHON #ifdef HAVE_PYTHON
#if PY_VERSION_HEX >= 0x02060000
int __getbuffer__(PyObject *self, Py_buffer *view, int flags) const; int __getbuffer__(PyObject *self, Py_buffer *view, int flags) const;
void __releasebuffer__(PyObject *self, Py_buffer *view) const; void __releasebuffer__(PyObject *self, Py_buffer *view) const;
#endif #endif
#endif
#else // CPPPARSER #else // CPPPARSER
// This is the actual, complete interface. // This is the actual, complete interface.
@ -370,8 +374,10 @@ PUBLISHED:
INLINE bool node_unref() const; INLINE bool node_unref() const;
#ifdef HAVE_PYTHON #ifdef HAVE_PYTHON
#if PY_VERSION_HEX >= 0x02060000
int __getbuffer__(PyObject *self, Py_buffer *view, int flags) const; int __getbuffer__(PyObject *self, Py_buffer *view, int flags) const;
void __releasebuffer__(PyObject *self, Py_buffer *view) const; void __releasebuffer__(PyObject *self, Py_buffer *view) const;
#endif
#endif #endif
// Reassignment is by pointer, not memberwise as with a vector. // Reassignment is by pointer, not memberwise as with a vector.