diff options
author | Christian Tismer <tismer@stackless.com> | 2018-07-19 21:00:30 +0200 |
---|---|---|
committer | Christian Tismer <tismer@stackless.com> | 2018-07-23 16:32:01 +0000 |
commit | e24392c76e5cfdd2d6d51bd853b106db2bc4cb80 (patch) | |
tree | 985048135d3a6a81da2f5a72b667ff59ed4d0b44 /sources/pyside2/PySide2/QtQuick | |
parent | 5d21980ba4bd605ccbf4278e75177ae2c144bdd8 (diff) |
Pep 384 Final Cut: Remove PepType
While trying to document the Limited API Project,
it suddenly struck me:
We can make the patch much much simpler and implement it
without the necessity to have an extra PepType!
Now I am happy to continue the documentation, because
it is now no more improvable.
This version will last as long as the layout of
PyTypeObject does not change substantially. When that
happens, then we need to rewrite stuff with the according
PyType_GetSlot() access functions.
These access functions will until then be complete enough
so that we can live without the tricks like inventing a reduced
PyTypeObject as was done in the current implementation.
Task-number: PYSIDE-560
Change-Id: I49849cc377baa6794a5b53292691e21d6e2853ab
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'sources/pyside2/PySide2/QtQuick')
-rw-r--r-- | sources/pyside2/PySide2/QtQuick/pysidequickregistertype.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sources/pyside2/PySide2/QtQuick/pysidequickregistertype.cpp b/sources/pyside2/PySide2/QtQuick/pysidequickregistertype.cpp index 67ef53551..bf3ff06a2 100644 --- a/sources/pyside2/PySide2/QtQuick/pysidequickregistertype.cpp +++ b/sources/pyside2/PySide2/QtQuick/pysidequickregistertype.cpp @@ -110,7 +110,7 @@ bool pyTypeObjectInheritsFromClass(PyTypeObject *pyObjType, QByteArray className { className.append('*'); PyTypeObject *classPyType = Shiboken::Conversions::getPythonTypeObject(className.constData()); - bool isDerived = PySequence_Contains(PepType(pyObjType)->tp_mro, + bool isDerived = PySequence_Contains(pyObjType->tp_mro, reinterpret_cast<PyObject *>(classPyType)); return isDerived; } @@ -190,7 +190,7 @@ bool quickRegisterType(PyObject *pyObj, const char *uri, int versionMajor, int v PyTypeObject *pyObjType = reinterpret_cast<PyTypeObject *>(pyObj); PyTypeObject *qQuickItemPyType = Shiboken::Conversions::getPythonTypeObject("QQuickItem*"); - bool isQuickItem = PySequence_Contains(PepType(pyObjType)->tp_mro, + bool isQuickItem = PySequence_Contains(pyObjType->tp_mro, reinterpret_cast<PyObject *>(qQuickItemPyType)); // Register only classes that inherit QQuickItem or its children. |