summaryrefslogtreecommitdiff
path: root/dev-python/shiboken2/files/shiboken2-5.15.2-python311-fixups.patch
diff options
context:
space:
mode:
Diffstat (limited to 'dev-python/shiboken2/files/shiboken2-5.15.2-python311-fixups.patch')
-rw-r--r--dev-python/shiboken2/files/shiboken2-5.15.2-python311-fixups.patch47
1 files changed, 0 insertions, 47 deletions
diff --git a/dev-python/shiboken2/files/shiboken2-5.15.2-python311-fixups.patch b/dev-python/shiboken2/files/shiboken2-5.15.2-python311-fixups.patch
deleted file mode 100644
index 4ab435555591..000000000000
--- a/dev-python/shiboken2/files/shiboken2-5.15.2-python311-fixups.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-The Fedora / upstream fixes (shiboken2-5.15.2-python311.patch) end up breaking
-Python 3.8 compatibility (maybe 3.9 too, but didn't get that far).
-
-Wrap them with PY_VERSION_HEX for Python 3.11.
---- a/libshiboken/basewrapper.cpp
-+++ b/libshiboken/basewrapper.cpp
-@@ -366,7 +366,11 @@ SbkObjectType *SbkObject_TypeF(void)
- static PyTypeObject *type = nullptr;
- if (!type) {
- type = reinterpret_cast<PyTypeObject *>(SbkType_FromSpec(&SbkObject_Type_spec));
-- Py_SET_TYPE(type, SbkObjectType_TypeF());
-+ #if PY_VERSION_HEX < 0x030B00A1
-+ Py_TYPE(type) = SbkObjectType_TypeF();
-+ #else
-+ Py_SET_TYPE(type, SbkObjectType_TypeF());
-+ #endif
- Py_INCREF(Py_TYPE(type));
- type->tp_weaklistoffset = offsetof(SbkObject, weakreflist);
- type->tp_dictoffset = offsetof(SbkObject, ob_dict);
-@@ -1110,7 +1114,11 @@ introduceWrapperType(PyObject *enclosingObject,
- typeSpec->slots[0].pfunc = reinterpret_cast<void *>(baseType ? baseType : SbkObject_TypeF());
-
- PyObject *heaptype = SbkType_FromSpecWithBases(typeSpec, baseTypes);
-- Py_SET_TYPE(heaptype, SbkObjectType_TypeF());
-+ #if PY_VERSION_HEX < 0x030B00A1
-+ Py_TYPE(heaptype) = SbkObjectType_TypeF();
-+ #else
-+ Py_SET_TYPE(heaptype, SbkObjectType_TypeF());
-+ #endif
- Py_INCREF(Py_TYPE(heaptype));
- auto *type = reinterpret_cast<SbkObjectType *>(heaptype);
- #if PY_VERSION_HEX < 0x03000000
---- a/libshiboken/sbkenum.cpp
-+++ b/libshiboken/sbkenum.cpp
-@@ -741,7 +741,11 @@ newTypeWithName(const char *name,
- copyNumberMethods(numbers_fromFlag, newslots, &idx);
- newspec.slots = newslots;
- auto *type = reinterpret_cast<PyTypeObject *>(SbkType_FromSpec(&newspec));
-- Py_SET_TYPE(type, SbkEnumType_TypeF());
-+ #if PY_VERSION_HEX < 0x030B00A1
-+ Py_TYPE(type) = SbkEnumType_TypeF();
-+ #else
-+ Py_SET_TYPE(type, SbkEnumType_TypeF());
-+ #endif
-
- auto *enumType = reinterpret_cast<SbkEnumType *>(type);
- PepType_SETP(enumType)->cppName = cppName;