Python 'printd' debug output strings not wide

.. we cannot pass wide strings to the 'printd' debug macro
   since it uses printf not wprintf. Not a major problem
   in this case since it is just a debug statement.

   introduced in previous commit that fixed crashes
   when embedding python v3.11 or higher
This commit is contained in:
Mark Liversedge
2023-06-01 09:12:58 +01:00
parent e0a198a164
commit 8b3dbbca7b

View File

@@ -225,7 +225,7 @@ PythonEmbed::PythonEmbed(const bool verbose, const bool interactive) : verbose(v
printd("Python is installed: %s\n", pybin.toStdString().c_str());
// tell python our program name - pretend to be the usual interpreter
printd("Py_SetProgramName: %s\n", pybin.toStdWString().c_str());
printd("Py_SetProgramName: %s\n", pybin.toStdString().c_str()); // not wide char string as printd uses printf not wprintf
Py_SetProgramName((wchar_t*) pybin.toStdWString().c_str());
// our own module