aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/libpyside/pysidesignal.cpp
diff options
context:
space:
mode:
authorChristian Tismer <tismer@stackless.com>2023-10-08 18:20:39 +0200
committerChristian Tismer <tismer@stackless.com>2023-10-09 11:32:10 +0200
commit8b9d69fac87cb18777e33103512c8592edd05ff4 (patch)
treeb862eb3fc03a5d4a4fe87087eeff839c8ad83803 /sources/pyside6/libpyside/pysidesignal.cpp
parent65ac5d41a68dac51f85976e22ad2379d659f2f8e (diff)
shiboken: Get rid of tp_dict in general
It is a long due task to finally remove the direct access to type object fields. With Python 3.12, direct access to tp_dict became problematic. We use that as a reason to start removing the direct access in favor of function calls. Task-number: PYSIDE-2230 Change-Id: I6f8a7479ab0afdbef14d4661f66c3588f3a578aa Pick-to: 6.2 6.5 6.6 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'sources/pyside6/libpyside/pysidesignal.cpp')
-rw-r--r--sources/pyside6/libpyside/pysidesignal.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/sources/pyside6/libpyside/pysidesignal.cpp b/sources/pyside6/libpyside/pysidesignal.cpp
index 64eb62b76..073e7c2ff 100644
--- a/sources/pyside6/libpyside/pysidesignal.cpp
+++ b/sources/pyside6/libpyside/pysidesignal.cpp
@@ -1100,7 +1100,8 @@ static typename T::value_type join(T t, const char *sep)
static void _addSignalToWrapper(PyTypeObject *wrapperType, const char *signalName, PySideSignal *signal)
{
- auto typeDict = wrapperType->tp_dict;
+ AutoDecRef tpDict(PepType_GetDict(wrapperType));
+ auto typeDict = tpDict.object();
PyObject *homonymousMethod;
if ((homonymousMethod = PyDict_GetItemString(typeDict, signalName))) {
Py_INCREF(homonymousMethod);