From ae4bddd7f7fe95dd45e408c1642bcad70dfd83b7 Mon Sep 17 00:00:00 2001 From: rdb Date: Sun, 9 Mar 2014 01:00:23 +0000 Subject: [PATCH] Fix Python 3 compile issue --- dtool/src/interrogate/interfaceMakerPythonNative.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dtool/src/interrogate/interfaceMakerPythonNative.cxx b/dtool/src/interrogate/interfaceMakerPythonNative.cxx index d8b1331efd..2e089b09d8 100755 --- a/dtool/src/interrogate/interfaceMakerPythonNative.cxx +++ b/dtool/src/interrogate/interfaceMakerPythonNative.cxx @@ -1942,7 +1942,7 @@ write_module_class(ostream &out, Object *obj) { out << " Dtool_" << ClassName << ".As_PyTypeObject().tp_flags |= Py_TPFLAGS_HAVE_ITER;\n"; } if (has_local_getbuffer) { - out << "#if PY_VERSION_HEX >= 0x02060000\n"; + out << "#if PY_VERSION_HEX >= 0x02060000 && PY_VERSION_HEX < 0x03000000\n"; out << " Dtool_" << ClassName << ".As_PyTypeObject().tp_flags |= Py_TPFLAGS_HAVE_NEWBUFFER;\n"; out << "#endif"; }