Skip to content

Commit

Permalink
Fixes writeReturnValueHeuristics to not mess with constructors.
Browse files Browse the repository at this point in the history
Also fixes isWrapperType to avoid erring when the type is an
object type passed as value.

Reviewed by Hugo Parente <[email protected]>
Reviewed by Luciano Wolf <[email protected]>
  • Loading branch information
Marcelo Lira committed Oct 17, 2011
1 parent 5ee637f commit db044d2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions generator/cppgenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4187,6 +4187,7 @@ void CppGenerator::writeReturnValueHeuristics(QTextStream& s, const AbstractMeta
|| !func->ownerClass()
|| !type
|| func->isStatic()
|| func->isConstructor()
|| !func->typeReplaced(0).isEmpty()) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion generator/shibokengenerator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -864,7 +864,7 @@ bool ShibokenGenerator::isWrapperType(const AbstractMetaType* metaType)

bool ShibokenGenerator::isPointerToWrapperType(const AbstractMetaType* type)
{
return isObjectType(type) || type->isValuePointer();
return (isObjectType(type) && type->indirections() == 1) || type->isValuePointer();
}

bool ShibokenGenerator::shouldDereferenceArgumentPointer(const AbstractMetaArgument* arg)
Expand Down

0 comments on commit db044d2

Please sign in to comment.