aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken6/generator/shiboken/cppgenerator.cpp
diff options
context:
space:
mode:
authorChristian Tismer <tismer@stackless.com>2021-01-21 19:06:38 +0100
committerChristian Tismer <tismer@stackless.com>2021-02-06 16:35:49 +0100
commit408ccdeccf82d114656a3f85d5fe80a5e3dd3c69 (patch)
treebb6085aa15f6076d4c15dc6242bcc5a36945f6f9 /sources/shiboken6/generator/shiboken/cppgenerator.cpp
parentcd9a1b0543f65b0d8a4c1fa8e498438d5b5d67c9 (diff)
move "shiboken6/shiboken6" to "shiboken6/Shiboken" temp
The modified path is partially undone by supporting the old structure as well. This is done in the build and install dir, because the directory structures are compatible, now. This patch should be undone when 6.2 starts. Task-number: PYSIDE-1497 Change-Id: I2978ff9594977ef7104fccfa17a46cabfca70f45 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io> Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/shiboken6/generator/shiboken/cppgenerator.cpp')
-rw-r--r--sources/shiboken6/generator/shiboken/cppgenerator.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/sources/shiboken6/generator/shiboken/cppgenerator.cpp b/sources/shiboken6/generator/shiboken/cppgenerator.cpp
index 40f98b642..51ac49c9d 100644
--- a/sources/shiboken6/generator/shiboken/cppgenerator.cpp
+++ b/sources/shiboken6/generator/shiboken/cppgenerator.cpp
@@ -6246,6 +6246,14 @@ bool CppGenerator::finishGeneration()
<< "_SignatureStrings);\n"
<< "\nreturn module;\n" << outdent << "}\n";
+ // Temporary hack to allow that the same module can be used both as
+ // `Shiboken` and `shiboken6`; this will go away in 6.1.
+ if (moduleName() == QLatin1String("Shiboken")) {
+ s << "\n// This function should be removed in version 6.2.\n"
+ << "extern \"C\" LIBSHIBOKEN_EXPORT PyObject *PyInit_shiboken6()\n{\n" << indent
+ << "return PyInit_Shiboken();\n" << outdent
+ << "}\n";
+ }
return file.done() != FileOut::Failure;
}