Base: Remove deprecated Py_GetPath call

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:
Chris Hennes
2025-03-22 17:10:54 -05:00
parent b0724a34d9
commit 5941c7e0ba
3 changed files with 36 additions and 8 deletions

View File

@@ -2635,8 +2635,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");