aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/PySide6/glue/qtgui.cpp
diff options
context:
space:
mode:
authorCristián Maureira-Fredes <cristian.maureira-fredes@qt.io>2024-11-07 10:59:03 +0100
committerCristián Maureira-Fredes <Cristian.Maureira-Fredes@qt.io>2024-11-08 08:33:38 +0100
commit57cf99afc5fcbc7608790a42471667ed6d7bdea3 (patch)
tree96f426bb1ff7b22c8d89679edd19ca1c7faf4469 /sources/pyside6/PySide6/glue/qtgui.cpp
parentfb13a26a76eba415e743d119d5d2782c607fee2f (diff)
limited api: replace PySequence_Fast_GET_SIZE by PySequence_Size
PySequence_Fast_GET_SIZE is defined as: (PyList_Check(o) ? PyList_GET_SIZE(o) : PyTuple_GET_SIZE(o)) and when using the Limited API we re-define the _GET_SIZE macro to be the _Size function, and considering this is our standard use case, the macro could be replaced directly by the function. Replacing also some cases were int was used instead of Py_ssize_t when using PySequence_Size. Pick-to: 6.8 Change-Id: I31aecd571a1d8ea82a3441f0b9e16ee19f026b05 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'sources/pyside6/PySide6/glue/qtgui.cpp')
-rw-r--r--sources/pyside6/PySide6/glue/qtgui.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/sources/pyside6/PySide6/glue/qtgui.cpp b/sources/pyside6/PySide6/glue/qtgui.cpp
index 428840898..9ef97dfd3 100644
--- a/sources/pyside6/PySide6/glue/qtgui.cpp
+++ b/sources/pyside6/PySide6/glue/qtgui.cpp
@@ -740,7 +740,7 @@ for (Py_ssize_t i = 0; i < 16; ++i) {
// @snippet qmatrix4x4-mgetitem
if (PySequence_Check(_key)) {
Shiboken::AutoDecRef key(PySequence_Fast(_key, "Invalid matrix index."));
- if (PySequence_Fast_GET_SIZE(key.object()) == 2) {
+ if (PySequence_Size(key.object()) == 2) {
Shiboken::AutoDecRef posx(PySequence_GetItem(key.object(), 0));
Shiboken::AutoDecRef posy(PySequence_GetItem(key.object(), 1));
Py_ssize_t x = PyLong_AsSsize_t(posx);