Skip to content

Commit 07bf243

Browse files
committed
Revert "Python 3.11.10 test"
This reverts commit ee921e4.
1 parent ee921e4 commit 07bf243

File tree

1 file changed

+8
-10
lines changed

1 file changed

+8
-10
lines changed

libsrc/python/PythonProgram.cpp

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -88,12 +88,11 @@ void PythonProgram::execute(const QByteArray& python_code)
8888
if (!main_module)
8989
{
9090
// Restore the previous thread state
91-
// #if (PY_VERSION_HEX < 0x030C0000)
92-
// PyThreadState_Swap(mainThreadState);
93-
// #else
91+
#if (PY_VERSION_HEX < 0x030C0000)
92+
PyThreadState_Swap(mainThreadState);
93+
#else
9494
PyThreadState_Swap(prev_thread_state);
95-
qDebug() << "PyThreadState_Swap(prev_thread_state);";
96-
// #endif
95+
#endif
9796
return;
9897
}
9998

@@ -176,11 +175,10 @@ void PythonProgram::execute(const QByteArray& python_code)
176175
Py_DECREF(main_module);
177176

178177
// Restore the previous thread state
179-
// #if (PY_VERSION_HEX < 0x030C0000)
180-
// PyThreadState_Swap(mainThreadState);
181-
// #else
178+
#if (PY_VERSION_HEX < 0x030C0000)
179+
PyThreadState_Swap(mainThreadState);
180+
#else
182181
PyThreadState_Swap(prev_thread_state);
183-
qDebug() << "PyThreadState_Swap(prev_thread_state);";
184-
// #endif
182+
#endif
185183
}
186184

0 commit comments

Comments
 (0)