Removed old Python code <3.10

This commit is contained in:
mos
2025-03-07 16:58:22 +01:00
committed by Chris Hennes
parent 5bdfd8000b
commit 9f220319d0
9 changed files with 6 additions and 113 deletions

View File

@@ -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);