From 65a9ae9a853fa68ff997edbe3d6fd4eed022f1a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristi=C3=A1n=20Maureira-Fredes?= Date: Wed, 6 Nov 2024 11:10:03 +0100 Subject: limited api: Remove PyTuple_GET_ITEM, PyTuple_SET_ITEM, and PyTuple_GET_SIZE macros Removing old macros for compatibility with the limited api, and refactoring some of their usages Change-Id: I33954199d2ef9884c64b963863b97aed851c440f Pick-to: 6.8 Reviewed-by: Friedemann Kleint --- sources/pyside6/PySide6/glue/qhttpserver.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sources/pyside6/PySide6/glue/qhttpserver.cpp') diff --git a/sources/pyside6/PySide6/glue/qhttpserver.cpp b/sources/pyside6/PySide6/glue/qhttpserver.cpp index c3afafb95..dd08a38af 100644 --- a/sources/pyside6/PySide6/glue/qhttpserver.cpp +++ b/sources/pyside6/PySide6/glue/qhttpserver.cpp @@ -15,7 +15,7 @@ bool cppResult = %CPPSELF.%FUNCTION_NAME(rule, Shiboken::GilState state; auto *requestPtr = &request; Shiboken::AutoDecRef arglist(PyTuple_New(1)); - PyTuple_SET_ITEM(arglist, 0, + PyTuple_SetItem(arglist, 0, %CONVERTTOPYTHON[QHttpServerRequest *](requestPtr)); PyObject *ret = PyObject_CallObject(callable, arglist); if (PyErr_Occurred()) @@ -38,9 +38,9 @@ auto callback = [callable](const QHttpServerRequest &request, Shiboken::AutoDecRef arglist(PyTuple_New(2)); auto *responsePtr = &response; auto *requestPtr = &request; - PyTuple_SET_ITEM(arglist, 0, + PyTuple_SetItem(arglist, 0, %CONVERTTOPYTHON[QHttpServerRequest *](requestPtr)); - PyTuple_SET_ITEM(arglist, 1, + PyTuple_SetItem(arglist, 1, %CONVERTTOPYTHON[QHttpServerResponse *](responsePtr)); PyObject_CallObject(callable, arglist); if (PyErr_Occurred()) -- cgit v1.2.3