Fix Python 3 build issue with iterator extensions

This commit is contained in:
rdb 2014-05-23 13:42:26 +00:00
parent 1d43bd0f39
commit 5b967671fa

View File

@ -1962,7 +1962,9 @@ write_module_class(ostream &out, Object *obj) {
// Add flags.
if (obj->_protocol_types & Object::PT_iter) {
out << "#if PY_VERSION_HEX < 0x03000000\n";
out << " Dtool_" << ClassName << ".As_PyTypeObject().tp_flags |= Py_TPFLAGS_HAVE_ITER;\n";
out << "#endif";
}
if (has_local_getbuffer) {
out << "#if PY_VERSION_HEX >= 0x02060000 && PY_VERSION_HEX < 0x03000000\n";