mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-02 09:52:27 -04:00
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.
|
// Add flags.
|
||||||
if (obj->_protocol_types & Object::PT_iter) {
|
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 << " Dtool_" << ClassName << ".As_PyTypeObject().tp_flags |= Py_TPFLAGS_HAVE_ITER;\n";
|
||||||
|
out << "#endif";
|
||||||
}
|
}
|
||||||
if (has_local_getbuffer) {
|
if (has_local_getbuffer) {
|
||||||
out << "#if PY_VERSION_HEX >= 0x02060000 && PY_VERSION_HEX < 0x03000000\n";
|
out << "#if PY_VERSION_HEX >= 0x02060000 && PY_VERSION_HEX < 0x03000000\n";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user