aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml
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/pyside6/PySide6/QtCore/typesystem_core_common.xml
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/pyside6/PySide6/QtCore/typesystem_core_common.xml')
-rw-r--r--sources/pyside6/PySide6/QtCore/typesystem_core_common.xml6
1 files changed, 2 insertions, 4 deletions
diff --git a/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml b/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml
index e74fd8130..53ba2f254 100644
--- a/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml
+++ b/sources/pyside6/PySide6/QtCore/typesystem_core_common.xml
@@ -187,7 +187,7 @@
<primitive-type name="short"/>
<primitive-type name="signed short"/>
<primitive-type name="signed short int"/>
- <primitive-type name="ushort" target-lang-api-name="PyInt"/>
+ <primitive-type name="ushort" target-lang-api-name="PyLong"/>
<primitive-type name="unsigned short int"/>
<primitive-type name="unsigned short"/>
<primitive-type name="char"/>
@@ -266,7 +266,7 @@
<native-to-target file="../glue/qtcore.cpp" snippet="return-pyunicode-qchar"/>
<target-to-native>
<add-conversion type="PyString" check="Shiboken::String::checkChar(%in)" file="../glue/qtcore.cpp" snippet="conversion-pystring-char"/>
- <add-conversion type="PyInt" file="../glue/qtcore.cpp" snippet="conversion-pyint"/>
+ <add-conversion type="PyLong" file="../glue/qtcore.cpp" snippet="conversion-pyint"/>
<add-conversion type="Py_None" file="../glue/qtcore.cpp" snippet="conversion-pynone"/>
</target-to-native>
</conversion-rule>
@@ -281,8 +281,6 @@
<add-conversion type="QString" check="Shiboken::String::check(%in)" file="../glue/qtcore.cpp" snippet="conversion-qstring"/>
<add-conversion type="QByteArray" file="../glue/qtcore.cpp" snippet="conversion-qbytearray"/>
<add-conversion type="PyFloat" check="PyFloat_CheckExact(%in)" file="../glue/qtcore.cpp" snippet="conversion-pyfloat"/>
- <!-- Using PyLong instead of PyInt to support Python2 and 3-->
- <add-conversion type="PyInt" check="PyInt_CheckExact(%in)" file="../glue/qtcore.cpp" snippet="conversion-qlonglong"/>
<add-conversion type="PyLong" check="PyLong_CheckExact(%in)" file="../glue/qtcore.cpp" snippet="conversion-qlonglong"/>
<add-conversion type="SbkEnumType" file="../glue/qtcore.cpp" snippet="conversion-pyint"/>
<add-conversion type="SbkObject" file="../glue/qtcore.cpp" snippet="conversion-sbkobject"/>