summaryrefslogtreecommitdiffstats
path: root/generator/shibokengenerator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'generator/shibokengenerator.cpp')
-rw-r--r--generator/shibokengenerator.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/generator/shibokengenerator.cpp b/generator/shibokengenerator.cpp
index 72f396d0..387a8769 100644
--- a/generator/shibokengenerator.cpp
+++ b/generator/shibokengenerator.cpp
@@ -1145,6 +1145,7 @@ void ShibokenGenerator::writeCodeSnips(QTextStream& s,
// class context in which the variable is used
code.replace("%PYTHONTYPEOBJECT", cpythonTypeName(context) + ".super.ht_type");
code.replace("%TYPE", wrapperName(context));
+ code.replace("%CPPTYPE", context->name());
}
// replace "toPython "converters
@@ -1325,6 +1326,9 @@ void ShibokenGenerator::writeCodeSnips(QTextStream& s,
if (func->isConstructor() && shouldGenerateCppWrapper(func->ownerClass()))
code.replace("%TYPE", wrapperName(func->ownerClass()));
+ if (func->ownerClass())
+ code.replace("%CPPTYPE", func->ownerClass()->name());
+
replaceTemplateVariables(code, func);
}