aboutsummaryrefslogtreecommitdiffstats
path: root/generator
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.pl@gmail.com>2011-02-10 18:34:15 -0200
committerHugo Parente Lima <hugo.pl@gmail.com>2012-03-08 16:13:54 -0300
commitcefb9e9b58a2ff6d755d0c7949819e6bd62f83f4 (patch)
treef2d60183b040194c8acb449c82cbe9246210cfa1 /generator
parent3f76e757d035c0bfc1985ce29aa69c02616d3178 (diff)
Fix string used in tp_name on inner types.
Reviewer: Lauro Moura <lauro.neto@openbossa.org> Renato Araújo <renato.filho@openbossa.org>
Diffstat (limited to 'generator')
-rw-r--r--generator/cppgenerator.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/generator/cppgenerator.cpp b/generator/cppgenerator.cpp
index bc623e63b..8e3b391b7 100644
--- a/generator/cppgenerator.cpp
+++ b/generator/cppgenerator.cpp
@@ -2514,7 +2514,7 @@ void CppGenerator::writeClassDefinition(QTextStream& s, const AbstractMetaClass*
s << "static SbkObjectType " << className + "_Type" << " = { { {" << endl;
s << INDENT << "PyObject_HEAD_INIT(&SbkObjectType_Type)" << endl;
s << INDENT << "/*ob_size*/ 0," << endl;
- s << INDENT << "/*tp_name*/ \"" << metaClass->fullName() << "\"," << endl;
+ s << INDENT << "/*tp_name*/ \"" << getClassTargetFullName(metaClass) << "\"," << endl;
s << INDENT << "/*tp_basicsize*/ sizeof(SbkObject)," << endl;
s << INDENT << "/*tp_itemsize*/ 0," << endl;
s << INDENT << "/*tp_dealloc*/ " << tp_dealloc << ',' << endl;
@@ -3028,7 +3028,8 @@ void CppGenerator::writeEnumInitialization(QTextStream& s, const AbstractMetaEnu
s << cppEnum->name() << endl;
if (!cppEnum->isAnonymous()) {
- s << INDENT << "PyTypeObject* " << cpythonName << " = Shiboken::Enum::newType(\"" << cppEnum->name() << "\");" << endl;
+
+ s << INDENT << "PyTypeObject* " << cpythonName << " = Shiboken::Enum::newType(\"" << getClassTargetFullName(cppEnum) << "\");" << endl;
if (cppEnum->typeEntry()->flags())
s << INDENT << cpythonName << "->tp_as_number = &" << cpythonName << "_as_number;" << endl;