diff options
| author | Christian Tismer <tismer@stackless.com> | 2021-12-08 13:38:37 +0100 |
|---|---|---|
| committer | Christian Tismer <tismer@stackless.com> | 2021-12-08 14:29:17 +0100 |
| commit | c7624192801d30923e35a8c1a02fbfe6821dfd1c (patch) | |
| tree | 412cd30aee995aa2b706ac51991978797a8d11e5 /sources/pyside6/libpyside/pysidesignal.cpp | |
| parent | f029a27152cf7c7a741ce03a6f91be71729093ca (diff) | |
shiboken: replace deprecated PyCFunction_Call by PyObject_Call
This was a leftover decision, because the calls are
synonyms since a long time.
Found when searching incompatibilities with PyPy, but unrelated.
Task-number: PYSIDE-535
Change-Id: Ibbe3687a3919bb7177bb2831f1eb35820548a480
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/pyside6/libpyside/pysidesignal.cpp')
| -rw-r--r-- | sources/pyside6/libpyside/pysidesignal.cpp | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/sources/pyside6/libpyside/pysidesignal.cpp b/sources/pyside6/libpyside/pysidesignal.cpp index a12bc8baa..44763d427 100644 --- a/sources/pyside6/libpyside/pysidesignal.cpp +++ b/sources/pyside6/libpyside/pysidesignal.cpp @@ -651,14 +651,9 @@ static PyObject *signalCall(PyObject *self, PyObject *args, PyObject *kw) // method in C++ land. Shiboken::AutoDecRef homonymousMethod(getDescriptor(signal->homonymousMethod, nullptr, nullptr)); - if (PyCFunction_Check(homonymousMethod) - && (PyCFunction_GET_FLAGS(homonymousMethod.object()) & METH_STATIC)) { -#if PY_VERSION_HEX >= 0x03090000 + if (PyCFunction_Check(homonymousMethod.object()) + && (PyCFunction_GET_FLAGS(homonymousMethod.object()) & METH_STATIC)) return PyObject_Call(homonymousMethod, args, kw); -#else - return PyCFunction_Call(homonymousMethod, args, kw); -#endif - } // Assumes homonymousMethod is not a static method. ternaryfunc callFunc = Py_TYPE(signal->homonymousMethod)->tp_call; @@ -676,11 +671,7 @@ static PyObject *signalInstanceCall(PyObject *self, PyObject *args, PyObject *kw descrgetfunc getDescriptor = Py_TYPE(PySideSignal->d->homonymousMethod)->tp_descr_get; Shiboken::AutoDecRef homonymousMethod(getDescriptor(PySideSignal->d->homonymousMethod, PySideSignal->d->source, nullptr)); -#if PY_VERSION_HEX >= 0x03090000 - return PyObject_Call(homonymousMethod, args, kw); -#else - return PyCFunction_Call(homonymousMethod, args, kw); -#endif + return PyObject_Call(homonymousMethod, args, kw); } static PyObject *metaSignalCheck(PyObject * /* klass */, PyObject *arg) |
