diff options
-rw-r--r-- | sources/shiboken6/generator/shiboken/shibokengenerator.cpp | 11 | ||||
-rw-r--r-- | sources/shiboken6/generator/shiboken/shibokengenerator.h | 4 |
2 files changed, 7 insertions, 8 deletions
diff --git a/sources/shiboken6/generator/shiboken/shibokengenerator.cpp b/sources/shiboken6/generator/shiboken/shibokengenerator.cpp index faeb860f6..3f5b6e5c8 100644 --- a/sources/shiboken6/generator/shiboken/shibokengenerator.cpp +++ b/sources/shiboken6/generator/shiboken/shibokengenerator.cpp @@ -993,8 +993,7 @@ bool ShibokenGenerator::isNullPtr(const QString &value) || value == QLatin1String("NULLPTR") || value == QLatin1String("{}"); } -QString ShibokenGenerator::cpythonCheckFunction(AbstractMetaType metaType, - bool genericNumberType) const +QString ShibokenGenerator::cpythonCheckFunction(AbstractMetaType metaType) const { if (metaType.typeEntry()->isCustom()) { auto customCheckResult = guessCPythonCheckFunction(metaType.typeEntry()->name()); @@ -1009,7 +1008,7 @@ QString ShibokenGenerator::cpythonCheckFunction(AbstractMetaType metaType, return QLatin1String("Shiboken::String::check"); if (metaType.isVoidPointer()) return QLatin1String("PyObject_Check"); - return cpythonCheckFunction(metaType.typeEntry(), genericNumberType); + return cpythonCheckFunction(metaType.typeEntry()); } auto typeEntry = metaType.typeEntry(); if (typeEntry->isContainer()) { @@ -1056,16 +1055,16 @@ QString ShibokenGenerator::cpythonCheckFunction(AbstractMetaType metaType, } return typeCheck; } - return cpythonCheckFunction(typeEntry, genericNumberType); + return cpythonCheckFunction(typeEntry); } -QString ShibokenGenerator::cpythonCheckFunction(const TypeEntry *type, bool genericNumberType) const +QString ShibokenGenerator::cpythonCheckFunction(const TypeEntry *type) const { if (type->isCustom()) { AbstractMetaType metaType; auto customCheckResult = guessCPythonCheckFunction(type->name()); if (customCheckResult.type.has_value()) - return cpythonCheckFunction(customCheckResult.type.value(), genericNumberType); + return cpythonCheckFunction(customCheckResult.type.value()); return customCheckResult.checkFunction; } diff --git a/sources/shiboken6/generator/shiboken/shibokengenerator.h b/sources/shiboken6/generator/shiboken/shibokengenerator.h index 0ad4a5f79..03ebf2d2e 100644 --- a/sources/shiboken6/generator/shiboken/shibokengenerator.h +++ b/sources/shiboken6/generator/shiboken/shibokengenerator.h @@ -237,8 +237,8 @@ protected: static QString cpythonTypeName(const TypeEntry *type); static QString cpythonTypeNameExt(const TypeEntry *type); static QString cpythonTypeNameExt(const AbstractMetaType &type) ; - QString cpythonCheckFunction(const TypeEntry *type, bool genericNumberType = false) const; - QString cpythonCheckFunction(AbstractMetaType metaType, bool genericNumberType = false) const; + QString cpythonCheckFunction(const TypeEntry *type) const; + QString cpythonCheckFunction(AbstractMetaType metaType) const; /** * Receives the argument \p type and tries to find the appropriate AbstractMetaType for it * or a custom type check. |