aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/libshiboken/helper.cpp
diff options
context:
space:
mode:
authorChristian Tismer <[email protected]>2021-08-04 12:27:17 +0200
committerChristian Tismer <[email protected]>2021-08-06 00:06:45 +0200
commita21203d534c2947a2e5f472ace3e83c552e83191 (patch)
tree99b0b5a81bfc9c885a830f36543ba97790f95b35 /sources/shiboken6/libshiboken/helper.cpp
parent521dc4b6dcdd7d04a9ef6afe273833016f7ba31c (diff)
Shiboken: Remove cheating macros
There are a number of cheating macros that allow to use the same code in Python 2 and 3. Because Python 2 is gone, remove these macros. This conversion was partially difficult since certain types collapsed in the XML files and generated functions contained substrings of the macros. This is actually the fourth attempt. Task-number: PYSIDE-1019 Pick-to: 6.1 Change-Id: I116877afc8aa36f4710a40df1769f600b6b750ea Reviewed-by: Christian Tismer <[email protected]>
Diffstat (limited to 'sources/shiboken6/libshiboken/helper.cpp')
-rw-r--r--sources/shiboken6/libshiboken/helper.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/sources/shiboken6/libshiboken/helper.cpp b/sources/shiboken6/libshiboken/helper.cpp
index 02f8177f3..aa8d28c38 100644
--- a/sources/shiboken6/libshiboken/helper.cpp
+++ b/sources/shiboken6/libshiboken/helper.cpp
@@ -255,12 +255,12 @@ int *sequenceToIntArray(PyObject *obj, bool zeroTerminated)
for (int i = 0; i < size; i++) {
PyObject *item = PySequence_Fast_GET_ITEM(seq.object(), i);
- if (!PyInt_Check(item)) {
+ if (!PyLong_Check(item)) {
PyErr_SetString(PyExc_TypeError, "Sequence of ints expected");
delete[] array;
return nullptr;
}
- array[i] = PyInt_AsLong(item);
+ array[i] = PyLong_AsLong(item);
}
if (zeroTerminated)