diff options
author | Marcelo Lira <marcelo.lira@openbossa.org> | 2010-01-15 12:12:21 -0300 |
---|---|---|
committer | Marcelo Lira <marcelo.lira@openbossa.org> | 2010-01-15 20:12:25 -0300 |
commit | 4587abd19af6be7148dbe7891f909652e40a9aa2 (patch) | |
tree | 45570eece013e6984b6ad745e40cd11874c21a0a /shibokengenerator.cpp | |
parent | d2c94d6d62458419d54a698e67c8b123808ff09d (diff) |
Added ShibokenGenerator::shouldDereferenceAbstractMetaTypePointer method.
It checks if a meta type should be dereferenced by the Python method
wrapper passing it to C++.
ShibokenGenerator::shouldDereferenceArgumentPointer now calls the new
method.
Diffstat (limited to 'shibokengenerator.cpp')
-rw-r--r-- | shibokengenerator.cpp | 10 |
1 files changed, 7 insertions, 3 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) |