diff options
Diffstat (limited to 'support-new-python.diff')
-rw-r--r-- | support-new-python.diff | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/support-new-python.diff b/support-new-python.diff index 9180d02d524c..3a008396691f 100644 --- a/support-new-python.diff +++ b/support-new-python.diff @@ -10,14 +10,20 @@ SET(_32FLAGS "m" "u" "mu" "dm" "du" "dmu" "") ELSE() --- a/libshiboken/sbkenum.cpp 2021-02-09 14:52:17.062065563 -> -+++ b/libshiboken/sbkenum.cpp 2021-02-09 14:52:59.965800766 -> -@@ -529,7 +529,9 @@ ++++ b/libshiboken/sbkenum.cpp 2021-02-09 14:52:59.965800766 -> +@@ -527,9 +527,15 @@ + { + PyTypeObject* type = reinterpret_cast<PyTypeObject*>(new SbkEnumType); ::memset(type, 0, sizeof(SbkEnumType)); ++ #ifdef IS_PY3K ++ Py_SET_TYPE(type, &SbkEnumType_Type); ++ #else Py_TYPE(type) = &SbkEnumType_Type; ++ #endif type->tp_basicsize = sizeof(SbkEnumObject); -+#ifndef IS_PY3K ++ #ifndef IS_PY3K type->tp_print = &SbkEnumObject_print; -+#endif ++ #endif type->tp_repr = &SbkEnumObject_repr; type->tp_str = &SbkEnumObject_repr; type->tp_flags = Py_TPFLAGS_DEFAULT|Py_TPFLAGS_CHECKTYPES; |