summaryrefslogtreecommitdiffstats
path: root/sources/pyside2/libpyside/pysideproperty.cpp
diff options
context:
space:
mode:
authorChristian Tismer <tismer@stackless.com>2018-07-19 21:00:30 +0200
committerChristian Tismer <tismer@stackless.com>2018-07-23 16:32:01 +0000
commite24392c76e5cfdd2d6d51bd853b106db2bc4cb80 (patch)
tree985048135d3a6a81da2f5a72b667ff59ed4d0b44 /sources/pyside2/libpyside/pysideproperty.cpp
parent5d21980ba4bd605ccbf4278e75177ae2c144bdd8 (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/libpyside/pysideproperty.cpp')
-rw-r--r--sources/pyside2/libpyside/pysideproperty.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/sources/pyside2/libpyside/pysideproperty.cpp b/sources/pyside2/libpyside/pysideproperty.cpp
index ccec8a2c..279e09ec 100644
--- a/sources/pyside2/libpyside/pysideproperty.cpp
+++ b/sources/pyside2/libpyside/pysideproperty.cpp
@@ -152,7 +152,7 @@ static void qpropertyMetaCall(PySideProperty* pp, PyObject* self, QMetaObject::C
static PyObject *qpropertyTpNew(PyTypeObject *subtype, PyObject * /* args */, PyObject * /* kwds */)
{
- PySideProperty* me = reinterpret_cast<PySideProperty*>(PepType(subtype)->tp_alloc(subtype, 0));
+ PySideProperty* me = reinterpret_cast<PySideProperty*>(subtype->tp_alloc(subtype, 0));
me->d = new PySidePropertyPrivate;
memset(me->d, 0, sizeof(PySidePropertyPrivate));
PySidePropertyPrivate* pData = me->d;
@@ -210,7 +210,7 @@ int qpropertyTpInit(PyObject* self, PyObject* args, PyObject* kwds)
void qpropertyDeAlloc(PyObject* self)
{
qpropertyClear(self);
- PepType(Py_TYPE(self))->tp_free(self);
+ Py_TYPE(self)->tp_free(self);
}
PyObject *qPropertyCall(PyObject *self, PyObject *args, PyObject * /* kw */)
@@ -307,9 +307,9 @@ namespace {
static PyObject* getFromType(PyTypeObject* type, PyObject* name)
{
PyObject* attr = 0;
- attr = PyDict_GetItem(PepType(type)->tp_dict, name);
+ attr = PyDict_GetItem(type->tp_dict, name);
if (!attr) {
- PyObject* bases = PepType(type)->tp_bases;
+ PyObject* bases = type->tp_bases;
int size = PyTuple_GET_SIZE(bases);
for(int i=0; i < size; i++) {
PyObject* base = PyTuple_GET_ITEM(bases, i);