diff options
author | Hugo Parente Lima <hugo.pl@gmail.com> | 2011-09-16 14:29:25 -0300 |
---|---|---|
committer | Hugo Parente Lima <hugo.pl@gmail.com> | 2012-03-08 16:17:14 -0300 |
commit | 4e17f2620f10677e09b9cb93c7ba8efa703b158b (patch) | |
tree | 7ffe0300a6c3166ebf0dca76c7ff9876ef9cbedc /generator/cppgenerator.cpp | |
parent | c686942f6efbac4ac43cf859bfdd2c7209b783ea (diff) |
Revert "Implements PSEP-0106 and fixes bug 902 - "Expose Shiboken functionality through a Python module"."
This reverts commit bc8448d7fb91733ff08c2a6a3a878702c14a24e0.
The PSEP didn't reach the final version yet, so this commit can't be released.
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; { |