Skip to content

Commit ee921e4

Browse files
Python 3.11.10 test
1 parent 2b926b9 commit ee921e4

File tree

1 file changed

+10
-8
lines changed

1 file changed

+10
-8
lines changed

libsrc/python/PythonProgram.cpp

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -88,11 +88,12 @@ 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-
#endif
95+
qDebug() << "PyThreadState_Swap(prev_thread_state);";
96+
// #endif
9697
return;
9798
}
9899

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

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

0 commit comments

Comments
 (0)