shiboken2: rebuild for Python 3.11
This commit is contained in:
parent
a0f9e05f1d
commit
af338f8ea2
3 changed files with 2 additions and 57 deletions
|
@ -1,56 +0,0 @@
|
||||||
--- a/sources/shiboken2/libshiboken/basewrapper.cpp
|
|
||||||
+++ b/sources/shiboken2/libshiboken/basewrapper.cpp
|
|
||||||
@@ -64,6 +64,12 @@
|
|
||||||
#include <dlfcn.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
+#if PY_VERSION_HEX < 0x03090000
|
|
||||||
+void Py_SET_TYPE(PyObject *o, PyTypeObject *type) {
|
|
||||||
+ Py_TYPE(o) = type;
|
|
||||||
+}
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
namespace {
|
|
||||||
void _destroyParentInfo(SbkObject *obj, bool keepReference);
|
|
||||||
}
|
|
||||||
@@ -377,7 +383,7 @@ SbkObjectType *SbkObject_TypeF(void)
|
|
||||||
static PyTypeObject *type = nullptr;
|
|
||||||
if (!type) {
|
|
||||||
type = reinterpret_cast<PyTypeObject *>(SbkType_FromSpec(&SbkObject_Type_spec));
|
|
||||||
- Py_TYPE(type) = SbkObjectType_TypeF();
|
|
||||||
+ Py_SET_TYPE(type, SbkObjectType_TypeF());
|
|
||||||
Py_INCREF(Py_TYPE(type));
|
|
||||||
type->tp_weaklistoffset = offsetof(SbkObject, weakreflist);
|
|
||||||
type->tp_dictoffset = offsetof(SbkObject, ob_dict);
|
|
||||||
@@ -1152,7 +1158,7 @@ introduceWrapperType(PyObject *enclosing
|
|
||||||
typeSpec->slots[0].pfunc = reinterpret_cast<void *>(baseType ? baseType : SbkObject_TypeF());
|
|
||||||
|
|
||||||
PyObject *heaptype = SbkType_FromSpecWithBases(typeSpec, baseTypes);
|
|
||||||
- Py_TYPE(heaptype) = SbkObjectType_TypeF();
|
|
||||||
+ Py_SET_TYPE(heaptype, SbkObjectType_TypeF());
|
|
||||||
Py_INCREF(Py_TYPE(heaptype));
|
|
||||||
auto *type = reinterpret_cast<SbkObjectType *>(heaptype);
|
|
||||||
#if PY_VERSION_HEX < 0x03000000
|
|
||||||
--- a/sources/shiboken2/libshiboken/sbkenum.cpp
|
|
||||||
+++ b/sources/shiboken2/libshiboken/sbkenum.cpp
|
|
||||||
@@ -55,6 +55,11 @@
|
|
||||||
#define SbkEnumType_Check(o) (Py_TYPE(Py_TYPE(o)) == SbkEnumType_TypeF())
|
|
||||||
typedef PyObject *(*enum_func)(PyObject *, PyObject *);
|
|
||||||
|
|
||||||
+#if PY_VERSION_HEX < 0x03090000
|
|
||||||
+void Py_SET_TYPE(PyObject *o, PyTypeObject *type) {
|
|
||||||
+ Py_TYPE(o) = type;
|
|
||||||
+}
|
|
||||||
+#endif
|
|
||||||
extern "C"
|
|
||||||
{
|
|
||||||
|
|
||||||
@@ -753,7 +758,7 @@ newTypeWithName(const char *name,
|
|
||||||
PyTuple_SetItem(bases, 0, reinterpret_cast<PyObject *>(basetype));
|
|
||||||
auto *type = reinterpret_cast<PyTypeObject *>(SbkType_FromSpecWithBases(&newspec, bases));
|
|
||||||
PyErr_Print();
|
|
||||||
- Py_TYPE(type) = SbkEnumType_TypeF();
|
|
||||||
+ Py_SET_TYPE(type, SbkEnumType_TypeF());
|
|
||||||
|
|
||||||
auto *enumType = reinterpret_cast<SbkEnumType *>(type);
|
|
||||||
PepType_SETP(enumType)->cppName = cppName;
|
|
1
srcpkgs/shiboken2/patches/python3.11.patch
Symbolic link
1
srcpkgs/shiboken2/patches/python3.11.patch
Symbolic link
|
@ -0,0 +1 @@
|
||||||
|
../../python3-pyside2/patches/python3.11.patch
|
|
@ -1,7 +1,7 @@
|
||||||
# Template file for 'shiboken2'
|
# Template file for 'shiboken2'
|
||||||
pkgname=shiboken2
|
pkgname=shiboken2
|
||||||
version=5.15.5
|
version=5.15.5
|
||||||
revision=1
|
revision=2
|
||||||
_pkgname="pyside-setup-opensource-src-${version}"
|
_pkgname="pyside-setup-opensource-src-${version}"
|
||||||
wrksrc="${_pkgname/%5.14.2.1/5.14.2}"
|
wrksrc="${_pkgname/%5.14.2.1/5.14.2}"
|
||||||
build_wrksrc="sources/shiboken2"
|
build_wrksrc="sources/shiboken2"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue