Removed old Python code <3.10
This commit is contained in:
@@ -485,8 +485,6 @@ void InterpreterSingleton::runFile(const char* pxFileName, bool local)
|
||||
|
||||
bool InterpreterSingleton::loadModule(const char* psModName)
|
||||
{
|
||||
// buffer acrobatics
|
||||
// PyBuf ModName(psModName);
|
||||
PyObject* module {};
|
||||
|
||||
PyGILStateLocker locker;
|
||||
@@ -567,10 +565,6 @@ const char* InterpreterSingleton::init(int argc, char* argv[])
|
||||
" exec(open(activate_this).read(), {'__file__':activate_this})\n");
|
||||
}
|
||||
|
||||
#if PY_VERSION_HEX < 0x03090000
|
||||
PyEval_InitThreads();
|
||||
#endif
|
||||
|
||||
size_t size = argc;
|
||||
static std::vector<wchar_t*> _argv(size);
|
||||
for (int i = 0; i < argc; i++) {
|
||||
@@ -774,11 +768,7 @@ void InterpreterSingleton::runMethod(PyObject* pobject,
|
||||
throw TypeError("InterpreterSingleton::RunMethod() wrong arguments");
|
||||
}
|
||||
|
||||
#if PY_VERSION_HEX < 0x03090000
|
||||
presult = PyEval_CallObject(pmeth, pargs); /* run interpreter */
|
||||
#else
|
||||
presult = PyObject_CallObject(pmeth, pargs); /* run interpreter */
|
||||
#endif
|
||||
|
||||
Py_DECREF(pmeth);
|
||||
Py_DECREF(pargs);
|
||||
|
||||
Reference in New Issue
Block a user