summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHugo Parente Lima <hugo.lima@openbossa.org>2010-04-16 19:44:28 -0300
committerHugo Parente Lima <hugo.lima@openbossa.org>2010-04-22 19:45:25 -0300
commitffbe891de37f48aa3ae8210e306d7e10adf0df7d (patch)
tree48ab832016d1377a49967aa7fed77ec714205e2c
parent3b75837ab1250e9cd2edde24c0e36c19ede7baf8 (diff)
downloadshiboken-ffbe891de37f48aa3ae8210e306d7e10adf0df7d.tar.gz
shiboken-ffbe891de37f48aa3ae8210e306d7e10adf0df7d.tar.xz
shiboken-ffbe891de37f48aa3ae8210e306d7e10adf0df7d.zip
Add namespaces to the array of type indexes.
-rw-r--r--cppgenerator.cpp4
-rw-r--r--headergenerator.cpp3
2 files changed, 2 insertions, 5 deletions
diff --git a/cppgenerator.cpp b/cppgenerator.cpp
index 16f43ba2..cc960f4f 100644
--- a/cppgenerator.cpp
+++ b/cppgenerator.cpp
@@ -2667,9 +2667,7 @@ void CppGenerator::writeClassRegister(QTextStream& s, const AbstractMetaClass* m
s << "PyAPI_FUNC(void)" << endl;
s << "init_" << metaClass->qualifiedCppName().replace("::", "_") << "(PyObject* module)" << endl;
s << '{' << endl;
-
- if (!metaClass->isNamespace())
- s << INDENT << cpythonTypeNameExt(metaClass->typeEntry()) << " = reinterpret_cast<PyTypeObject*>(&" << cpythonTypeName(metaClass->typeEntry()) << ");" << endl << endl;
+ s << INDENT << cpythonTypeNameExt(metaClass->typeEntry()) << " = reinterpret_cast<PyTypeObject*>(&" << cpythonTypeName(metaClass->typeEntry()) << ");" << endl << endl;
// class inject-code target/beginning
if (!metaClass->typeEntry()->codeSnips().isEmpty()) {
diff --git a/headergenerator.cpp b/headergenerator.cpp
index 9f58f160..27086bc9 100644
--- a/headergenerator.cpp
+++ b/headergenerator.cpp
@@ -217,8 +217,7 @@ void HeaderGenerator::writeTypeIndexDefine(QTextStream& s, const AbstractMetaCla
{
if (!metaClass->typeEntry()->generateCode())
return;
- if (!metaClass->isNamespace())
- writeTypeIndexDefineLine(s, metaClass->typeEntry(), idx);
+ writeTypeIndexDefineLine(s, metaClass->typeEntry(), idx);
foreach (const AbstractMetaEnum* metaEnum, metaClass->enums())
writeTypeIndexDefineLine(s, metaEnum->typeEntry(), idx);
}