App: remove some more deprecated Py2 code

and remove deprecated void from function signature and replace 0 or NULL with nullptr
This commit is contained in:
wmayer
2021-04-26 10:55:56 +02:00
parent af16ab02a0
commit 44e82ac3c4
5 changed files with 75 additions and 293 deletions

View File

@@ -510,11 +510,7 @@ void InterpreterSingleton::addPythonPath(const char* Path)
const char* InterpreterSingleton::init(int argc,char *argv[])
{
if (!Py_IsInitialized()) {
#if PY_VERSION_HEX >= 0x03050000
Py_SetProgramName(Py_DecodeLocale(argv[0],nullptr));
#else
Py_SetProgramName(_Py_char2wchar(argv[0],nullptr));
#endif
// There is a serious bug in VS from 2010 until 2013 where the file descriptor for stdin, stdout or stderr
// returns a valid value for GUI applications (i.e. subsystem = Windows) where it shouldn't.
// This causes Python to fail during initialization.