File tree Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Expand file tree Collapse file tree 1 file changed +8
-10
lines changed Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments