diff options
Diffstat (limited to 'generator/cppgenerator.cpp')
-rw-r--r-- | generator/cppgenerator.cpp | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/generator/cppgenerator.cpp b/generator/cppgenerator.cpp index 1beda78f7..5b94d2ce8 100644 --- a/generator/cppgenerator.cpp +++ b/generator/cppgenerator.cpp @@ -3941,11 +3941,9 @@ void CppGenerator::finishGeneration() s << INDENT << "}" << endl << endl; } - if (getMaxTypeIndex()) { - s << INDENT << "// Create an array of wrapper types for the current module." << endl; - s << INDENT << "static PyTypeObject* cppApi[" << "SBK_" << moduleName() << "_IDX_COUNT" << "];" << endl; - s << INDENT << cppApiVariableName() << " = cppApi;" << endl << endl; - } + s << INDENT << "// Create an array of wrapper types for the current module." << endl; + s << INDENT << "static PyTypeObject* cppApi[" << "SBK_" << moduleName() << "_IDX_COUNT" << "];" << endl; + s << INDENT << cppApiVariableName() << " = cppApi;" << endl << endl; s << INDENT << "PyObject* module = Shiboken::Module::create(\"" << moduleName() << "\", "; s << moduleName() << "_methods);" << endl << endl; @@ -3992,8 +3990,7 @@ void CppGenerator::finishGeneration() foreach (QByteArray type, typeResolvers) s << INDENT << typeResolverString(type) << ';' << endl; - if (getMaxTypeIndex()) - s << endl << INDENT << "Shiboken::Module::registerTypes(module, " << cppApiVariableName() << ");" << endl; + s << endl << INDENT << "Shiboken::Module::registerTypes(module, " << cppApiVariableName() << ");" << endl; s << endl << INDENT << "if (PyErr_Occurred()) {" << endl; { |