aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/libshiboken/sbkfeature_base.cpp
diff options
context:
space:
mode:
authorChristian Tismer <tismer@stackless.com>2021-08-04 12:27:17 +0200
committerChristian Tismer <tismer@stackless.com>2021-08-12 08:56:52 +0200
commit4e8bf7c94fdf253c5cc1448971b209793c6077d1 (patch)
treedf2f88b2543640ab125a0f01a1dd970e4d4edf9d /sources/shiboken6/libshiboken/sbkfeature_base.cpp
parent21a160203c68a165a6f6923d238300587e5fc921 (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 Change-Id: I116877afc8aa36f4710a40df1769f600b6b750ea Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit a21203d534c2947a2e5f472ace3e83c552e83191) Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/shiboken6/libshiboken/sbkfeature_base.cpp')
-rw-r--r--sources/shiboken6/libshiboken/sbkfeature_base.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/sources/shiboken6/libshiboken/sbkfeature_base.cpp b/sources/shiboken6/libshiboken/sbkfeature_base.cpp
index 0cbaf46be..679cf1fe4 100644
--- a/sources/shiboken6/libshiboken/sbkfeature_base.cpp
+++ b/sources/shiboken6/libshiboken/sbkfeature_base.cpp
@@ -78,13 +78,13 @@ PyObject *getFeatureSelectId()
PyObject *select_id = PyDict_GetItem(feature_dict, modname);
if (select_id == nullptr
- || !PyInt_Check(select_id) // int/long cheating
+ || !PyLong_Check(select_id) // int/long cheating
|| select_id == undef)
return last_select_id;
cached_globals = globals;
last_select_id = select_id;
- assert(PyInt_AsSsize_t(select_id) >= 0);
+ assert(PyLong_AsSsize_t(select_id) >= 0);
return select_id;
}