diff options
author | Christian Tismer <tismer@stackless.com> | 2019-04-12 10:58:02 +0200 |
---|---|---|
committer | Christian Tismer <tismer@stackless.com> | 2019-04-16 05:05:17 +0000 |
commit | b2b20bb28e178143dbee3004f33a4af23e5a9765 (patch) | |
tree | b4b3dd9e6a871b0be8343b809e3600364fa5cdd8 /sources/shiboken2/generator/shiboken2/cppgenerator.cpp | |
parent | 5b42f97fdfc0334e7628bbe30149227d0834edcd (diff) |
Cleanup And Simplify the Signature Related Code
Task-number: PYSIDE-510
Change-Id: I73c441b56a19a0ac836e3598ff6fc8c9ba4d1cd2
Reviewed-by: Christian Tismer <tismer@stackless.com>
Diffstat (limited to 'sources/shiboken2/generator/shiboken2/cppgenerator.cpp')
-rw-r--r-- | sources/shiboken2/generator/shiboken2/cppgenerator.cpp | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/sources/shiboken2/generator/shiboken2/cppgenerator.cpp b/sources/shiboken2/generator/shiboken2/cppgenerator.cpp index 18a032c25..b6d3687ac 100644 --- a/sources/shiboken2/generator/shiboken2/cppgenerator.cpp +++ b/sources/shiboken2/generator/shiboken2/cppgenerator.cpp @@ -5656,7 +5656,17 @@ bool CppGenerator::finishGeneration() s << " /* m_clear */ nullptr," << endl; s << " /* m_free */ nullptr" << endl; s << "};" << endl << endl; - s << "#endif" << endl; + s << "#endif" << endl << endl; + + // PYSIDE-510: Create a signatures string for the introspection feature. + s << "// The signatures string for the global functions." << endl; + s << "// Multiple signatures have their index \"n:\" in front." << endl; + s << "const char " << moduleName() << "_SignaturesString[] = \"\"" << endl; + QString line; + while (signatureStream.readLineInto(&line)) + s << INDENT << '"' << line << "\\n\"" << endl; + s << INDENT << ';' << endl << endl; + s << "SBK_MODULE_INIT_FUNCTION_BEGIN(" << moduleName() << ")" << endl; ErrorCode errorCode(QLatin1String("SBK_MODULE_INIT_ERROR")); @@ -5787,14 +5797,6 @@ bool CppGenerator::finishGeneration() s << INDENT << "PySide::registerCleanupFunction(cleanTypesAttributes);" << endl << endl; } - // PYSIDE-510: Create a signatures string for the introspection feature. - s << "// The signatures string for the global functions." << endl; - s << "// Multiple signatures have their index \"n:\" in front." << endl; - s << "const char " << moduleName() << "_SignaturesString[] = \"\"" << endl; - QString line; - while (signatureStream.readLineInto(&line)) - s << INDENT << '"' << line << "\\n\"" << endl; - s << ';' << endl; // finish the rest of __signature__ initialization. s << INDENT << "FinishSignatureInitialization(module, " << moduleName() << "_SignaturesString);" << endl; |