Fix Python 3 compile issue

This commit is contained in:
rdb 2014-03-09 01:00:23 +00:00
parent e38b97b26f
commit ae4bddd7f7

View File

@ -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";
}