aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--shibokengenerator.cpp10
-rw-r--r--shibokengenerator.h5
2 files changed, 10 insertions, 5 deletions
diff --git a/shibokengenerator.cpp b/shibokengenerator.cpp
index de879fd56..46036bf04 100644
--- a/shibokengenerator.cpp
+++ b/shibokengenerator.cpp
@@ -517,9 +517,13 @@ bool ShibokenGenerator::isPyInt(const AbstractMetaType* type)
bool ShibokenGenerator::shouldDereferenceArgumentPointer(const AbstractMetaArgument* arg)
{
- const AbstractMetaType* argType = arg->type();
- const TypeEntry* type = argType->typeEntry();
- return (type->isValue() || type->isObject()) && (argType->isValue() || argType->isReference());
+ return shouldDereferenceAbstractMetaTypePointer(arg->type());
+}
+
+bool ShibokenGenerator::shouldDereferenceAbstractMetaTypePointer(const AbstractMetaType* metaType)
+{
+ const TypeEntry* type = metaType->typeEntry();
+ return (type->isValue() || type->isObject()) && (metaType->isValue() || metaType->isReference());
}
static QString checkFunctionName(QString baseName, bool genericNumberType, bool checkExact)
diff --git a/shibokengenerator.h b/shibokengenerator.h
index cc403bd5f..794f63589 100644
--- a/shibokengenerator.h
+++ b/shibokengenerator.h
@@ -207,9 +207,10 @@ public:
static bool isNumber(const AbstractMetaType* type);
static bool isPyInt(const TypeEntry* type);
static bool isPyInt(const AbstractMetaType* type);
- /// Checks if an argument type should be dereferenced by the Python method wrapper
- /// before calling the C++ method.
+ /// Checks if an argument type should be dereferenced by the Python method wrapper before calling the C++ method.
static bool shouldDereferenceArgumentPointer(const AbstractMetaArgument* arg);
+ /// Checks if a meta type should be dereferenced by the Python method wrapper passing it to C++.
+ static bool shouldDereferenceAbstractMetaTypePointer(const AbstractMetaType* metaType);
QString cpythonBaseName(const AbstractMetaClass* metaClass);
QString cpythonBaseName(const TypeEntry* type);