Fix Python 3 build issue with iterator extensions
This commit is contained in:
parent
1d43bd0f39
commit
5b967671fa
|
|
@ -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";
|
||||
|
|
|
|||
Loading…
Reference in New Issue