aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/libpyside/pysideclassdecorator_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'sources/pyside6/libpyside/pysideclassdecorator_p.h')
-rw-r--r--sources/pyside6/libpyside/pysideclassdecorator_p.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/sources/pyside6/libpyside/pysideclassdecorator_p.h b/sources/pyside6/libpyside/pysideclassdecorator_p.h
index d4e21a5b4..6068f6a2e 100644
--- a/sources/pyside6/libpyside/pysideclassdecorator_p.h
+++ b/sources/pyside6/libpyside/pysideclassdecorator_p.h
@@ -7,6 +7,7 @@
#include <pysidemacros.h>
#include <sbkpython.h>
+#include <pep384ext.h>
#include <QtCore/QByteArray>
@@ -119,7 +120,7 @@ struct Methods
{
static PyObject *tp_new(PyTypeObject *subtype)
{
- auto *result = reinterpret_cast<PySideClassDecorator *>(subtype->tp_alloc(subtype, 0));
+ auto *result = PepExt_TypeCallAlloc<PySideClassDecorator>(subtype, 0);
result->d = new DecoratorPrivate;
return reinterpret_cast<PyObject *>(result);
}
@@ -129,7 +130,7 @@ struct Methods
auto pySelf = reinterpret_cast<PyObject *>(self);
auto decorator = reinterpret_cast<PySideClassDecorator *>(self);
delete decorator->d;
- Py_TYPE(pySelf)->tp_base->tp_free(self);
+ PepExt_TypeCallFree(Py_TYPE(pySelf)->tp_base, self);
}
static PyObject *tp_call(PyObject *self, PyObject *args, PyObject *kwds)