Browse Source

missed a few PY_VERSION_HEX checks for buffer interface support

rdb 12 years ago
parent
commit
ea126d3175
1 changed files with 6 additions and 0 deletions
  1. 6 0
      panda/src/express/pointerToArray.h

+ 6 - 0
panda/src/express/pointerToArray.h

@@ -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.