aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2022-09-29 15:32:22 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2022-09-30 17:19:10 +0000
commit5994498b5a4f848a7daf8f83b4f7f5e84c5d16b7 (patch)
treec02379abcdd5ac40f8aead36e20aa422c7d47bd8
parent082c6196b213f1eccb827598cf637aecdbcfb4fa (diff)
shiboken6: Replace pyIntT() by pyLongT()
pyIntT() is a left-over from Python2. Task-number: PYSIDE-2065 Change-Id: I07972d7f15eb5f3b3666e8ed4d9015434b4a9d26 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Adrian Herrmann <adrian.herrmann@qt.io> Reviewed-by: Christian Tismer <tismer@stackless.com> (cherry picked from commit 4cd7024040534c08850dffd3f4cd25989302ef5f) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
-rw-r--r--sources/shiboken6/generator/shiboken/pytypenames.h1
-rw-r--r--sources/shiboken6/generator/shiboken/shibokengenerator.cpp25
2 files changed, 12 insertions, 14 deletions
diff --git a/sources/shiboken6/generator/shiboken/pytypenames.h b/sources/shiboken6/generator/shiboken/pytypenames.h
index caeb6f671..1ca13f1ae 100644
--- a/sources/shiboken6/generator/shiboken/pytypenames.h
+++ b/sources/shiboken6/generator/shiboken/pytypenames.h
@@ -33,7 +33,6 @@
static inline QString pyBoolT() { return QStringLiteral("PyBool"); }
static inline QString pyFloatT() { return QStringLiteral("PyFloat"); }
-static inline QString pyIntT() { return QStringLiteral("PyLong"); }
static inline QString pyLongT() { return QStringLiteral("PyLong"); }
static inline QString pyObjectT() { return QStringLiteral("object"); }
static inline QString pyStrT() { return QStringLiteral("str"); }
diff --git a/sources/shiboken6/generator/shiboken/shibokengenerator.cpp b/sources/shiboken6/generator/shiboken/shibokengenerator.cpp
index 268cb7c25..a56ecc76a 100644
--- a/sources/shiboken6/generator/shiboken/shibokengenerator.cpp
+++ b/sources/shiboken6/generator/shiboken/shibokengenerator.cpp
@@ -125,17 +125,17 @@ static const QHash<QString, QString> &primitiveTypesCorrespondences()
{u"char"_s, sbkCharT()},
{u"signed char"_s, sbkCharT()},
{u"unsigned char"_s, sbkCharT()},
- {intT(), pyIntT()},
- {u"signed int"_s, pyIntT()},
- {u"uint"_s, pyIntT()},
- {u"unsigned int"_s, pyIntT()},
- {shortT(), pyIntT()},
- {u"ushort"_s, pyIntT()},
- {u"signed short"_s, pyIntT()},
- {u"signed short int"_s, pyIntT()},
- {unsignedShortT(), pyIntT()},
- {u"unsigned short int"_s, pyIntT()},
- {longT(), pyIntT()},
+ {intT(), pyLongT()},
+ {u"signed int"_s, pyLongT()},
+ {u"uint"_s, pyLongT()},
+ {u"unsigned int"_s, pyLongT()},
+ {shortT(), pyLongT()},
+ {u"ushort"_s, pyLongT()},
+ {u"signed short"_s, pyLongT()},
+ {u"signed short int"_s, pyLongT()},
+ {unsignedShortT(), pyLongT()},
+ {u"unsigned short int"_s, pyLongT()},
+ {longT(), pyLongT()},
{doubleT(), pyFloatT()},
{floatT(), pyFloatT()},
{u"unsigned long"_s, pyLongT()},
@@ -770,8 +770,7 @@ QString ShibokenGenerator::pythonOperatorFunctionName(const AbstractMetaFunction
bool ShibokenGenerator::isNumber(const QString &cpythonApiName)
{
- return cpythonApiName == pyIntT()
- || cpythonApiName == pyFloatT() || cpythonApiName == pyLongT()
+ return cpythonApiName == pyFloatT() || cpythonApiName == pyLongT()
|| cpythonApiName == pyBoolT();
}