diff options
Diffstat (limited to 'sources/shiboken6/libshiboken/sbkenum.cpp')
-rw-r--r-- | sources/shiboken6/libshiboken/sbkenum.cpp | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/sources/shiboken6/libshiboken/sbkenum.cpp b/sources/shiboken6/libshiboken/sbkenum.cpp index 212e6fb73..2cc0b935e 100644 --- a/sources/shiboken6/libshiboken/sbkenum.cpp +++ b/sources/shiboken6/libshiboken/sbkenum.cpp @@ -1084,17 +1084,6 @@ PyTypeObject *morphLastEnumToPython() auto *enumType = lec.enumType; // This is temporary; SbkEnumType will be removed, soon. - // PYSIDE-1735: Decide dynamically if new or old enums will be used. - if (useOldEnum) - return enumType; - - auto *setp = PepType_SETP(reinterpret_cast<SbkEnumType *>(enumType)); - if (setp->replacementType) { - // For some (yet to fix) reason, initialization of the enums can happen twice. - // If that happens, use the existing new type to keep type checks correct. - return setp->replacementType; - } - auto *scopeOrModule = lec.scopeOrModule; static PyObject *enumName = String::createStaticString("IntEnum"); if (PyType_Check(scopeOrModule)) { @@ -1180,9 +1169,6 @@ PyTypeObject *morphLastEnumToPython() } } - // Protect against double initialization - setp->replacementType = newType; - // PYSIDE-1735: Old Python versions can't stand the early enum deallocation. static bool old_python_version = is_old_version(); if (old_python_version) |