aboutsummaryrefslogtreecommitdiffstats
path: root/cppgenerator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cppgenerator.cpp')
-rw-r--r--cppgenerator.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/cppgenerator.cpp b/cppgenerator.cpp
index 16f43ba25..cc960f4fc 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()) {