Merge pull request #20379 from chennes/baseEliminatePy_GetPath

Replace it with a piece of code that replicates the functionality. Also eliminate the round-trip through char * that this function was using (the final variable is stored as a std::string anyway).
This commit is contained in:
Kacper Donat
2025-03-29 18:13:08 +01:00
committed by GitHub
5 changed files with 38 additions and 10 deletions

View File

@@ -2636,8 +2636,8 @@ void Application::initConfig(int argc, char ** argv)
Py_DECREF(pyModule);
}
const char* pythonpath = Base::Interpreter().init(argc,argv);
if (pythonpath)
std::string pythonpath = Base::Interpreter().init(argc,argv);
if (!pythonpath.empty())
mConfig["PythonSearchPath"] = pythonpath;
else
Base::Console().Warning("Encoding of Python paths failed\n");