From 4e8bf7c94fdf253c5cc1448971b209793c6077d1 Mon Sep 17 00:00:00 2001 From: Christian Tismer Date: Wed, 4 Aug 2021 12:27:17 +0200 Subject: 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 (cherry picked from commit a21203d534c2947a2e5f472ace3e83c552e83191) Reviewed-by: Cristian Maureira-Fredes --- sources/shiboken6/libshiboken/sbkfeature_base.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'sources/shiboken6/libshiboken/sbkfeature_base.cpp') 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; } -- cgit v1.2.3