Python 3.11.10 test

This commit is contained in:
Paulchen-Panther 2024-11-17 12:34:12 +01:00
parent 2b926b969e
commit ee921e4f12

View File

@ -88,11 +88,12 @@ void PythonProgram::execute(const QByteArray& python_code)
if (!main_module) if (!main_module)
{ {
// Restore the previous thread state // Restore the previous thread state
#if (PY_VERSION_HEX < 0x030C0000) // #if (PY_VERSION_HEX < 0x030C0000)
PyThreadState_Swap(mainThreadState); // PyThreadState_Swap(mainThreadState);
#else // #else
PyThreadState_Swap(prev_thread_state); PyThreadState_Swap(prev_thread_state);
#endif qDebug() << "PyThreadState_Swap(prev_thread_state);";
// #endif
return; return;
} }
@ -175,10 +176,11 @@ void PythonProgram::execute(const QByteArray& python_code)
Py_DECREF(main_module); Py_DECREF(main_module);
// Restore the previous thread state // Restore the previous thread state
#if (PY_VERSION_HEX < 0x030C0000) // #if (PY_VERSION_HEX < 0x030C0000)
PyThreadState_Swap(mainThreadState); // PyThreadState_Swap(mainThreadState);
#else // #else
PyThreadState_Swap(prev_thread_state); PyThreadState_Swap(prev_thread_state);
#endif qDebug() << "PyThreadState_Swap(prev_thread_state);";
// #endif
} }