aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sources/shiboken6/generator/shiboken/cppgenerator.cpp2
-rw-r--r--sources/shiboken6/generator/shiboken/shibokengenerator.cpp12
-rw-r--r--sources/shiboken6/generator/shiboken/shibokengenerator.h10
3 files changed, 8 insertions, 16 deletions
diff --git a/sources/shiboken6/generator/shiboken/cppgenerator.cpp b/sources/shiboken6/generator/shiboken/cppgenerator.cpp
index 1cda61c93..c62c5c384 100644
--- a/sources/shiboken6/generator/shiboken/cppgenerator.cpp
+++ b/sources/shiboken6/generator/shiboken/cppgenerator.cpp
@@ -2407,7 +2407,7 @@ void CppGenerator::writeTypeCheck(TextStream &s, AbstractMetaType argType,
// TODO-CONVERTER: merge this with the code below.
QString typeCheck;
if (customCheck.isEmpty())
- typeCheck = cpythonIsConvertibleFunction(argType, argType.isEnum() ? false : isNumber);
+ typeCheck = cpythonIsConvertibleFunction(argType);
else
typeCheck = customCheck;
typeCheck.append(u'(' +argumentName + u')');
diff --git a/sources/shiboken6/generator/shiboken/shibokengenerator.cpp b/sources/shiboken6/generator/shiboken/shibokengenerator.cpp
index 3f776f7ad..1a734d1e6 100644
--- a/sources/shiboken6/generator/shiboken/shibokengenerator.cpp
+++ b/sources/shiboken6/generator/shiboken/shibokengenerator.cpp
@@ -1127,9 +1127,7 @@ ShibokenGenerator::CPythonCheckFunctionResult
return result;
}
-QString ShibokenGenerator::cpythonIsConvertibleFunction(const TypeEntry *type,
- bool /* genericNumberType */,
- bool /* checkExact */)
+QString ShibokenGenerator::cpythonIsConvertibleFunction(const TypeEntry *type)
{
if (type->isWrapperType()) {
QString result = QLatin1String("Shiboken::Conversions::");
@@ -1148,8 +1146,7 @@ QString ShibokenGenerator::cpythonIsConvertibleFunction(const TypeEntry *type,
return QString::fromLatin1("Shiboken::Conversions::isPythonToCppConvertible(%1, ")
.arg(converterObject(type));
}
-QString ShibokenGenerator::cpythonIsConvertibleFunction(AbstractMetaType metaType,
- bool /* genericNumberType */) const
+QString ShibokenGenerator::cpythonIsConvertibleFunction(AbstractMetaType metaType) const
{
if (metaType.typeEntry()->isCustom()) {
auto customCheckResult = guessCPythonCheckFunction(metaType.typeEntry()->name());
@@ -1185,10 +1182,9 @@ QString ShibokenGenerator::cpythonIsConvertibleFunction(AbstractMetaType metaTyp
return result;
}
-QString ShibokenGenerator::cpythonIsConvertibleFunction(const AbstractMetaArgument &metaArg,
- bool genericNumberType) const
+QString ShibokenGenerator::cpythonIsConvertibleFunction(const AbstractMetaArgument &metaArg) const
{
- return cpythonIsConvertibleFunction(metaArg.type(), genericNumberType);
+ return cpythonIsConvertibleFunction(metaArg.type());
}
QString ShibokenGenerator::cpythonToCppConversionFunction(const AbstractMetaClass *metaClass)
diff --git a/sources/shiboken6/generator/shiboken/shibokengenerator.h b/sources/shiboken6/generator/shiboken/shibokengenerator.h
index 9bb3327ac..414410141 100644
--- a/sources/shiboken6/generator/shiboken/shibokengenerator.h
+++ b/sources/shiboken6/generator/shiboken/shibokengenerator.h
@@ -255,13 +255,9 @@ protected:
std::optional<AbstractMetaType> type;
};
static CPythonCheckFunctionResult guessCPythonCheckFunction(const QString &type);
- static QString cpythonIsConvertibleFunction(const TypeEntry *type,
- bool genericNumberType = false,
- bool checkExact = false);
- QString cpythonIsConvertibleFunction(AbstractMetaType metaType,
- bool genericNumberType = false) const;
- QString cpythonIsConvertibleFunction(const AbstractMetaArgument &metaArg,
- bool genericNumberType = false) const;
+ static QString cpythonIsConvertibleFunction(const TypeEntry *type);
+ QString cpythonIsConvertibleFunction(AbstractMetaType metaType) const;
+ QString cpythonIsConvertibleFunction(const AbstractMetaArgument &metaArg) const;
static QString cpythonToCppConversionFunction(const AbstractMetaClass *metaClass) ;
static QString cpythonToCppConversionFunction(const AbstractMetaType &type,