[BUGFIX] fix python38 compilation (#647)

This commit is contained in:
François Picot 2019-12-08 13:18:11 +01:00 committed by Paulchen Panther
parent ce7c99d2cd
commit 85d1016dff

View File

@ -213,7 +213,7 @@ void Effect::run()
Py_DECREF(main_dict); // release "main_dict" when done
}
// stop sub threads if needed
for (PyThreadState* s = tstate->interp->tstate_head, *old = nullptr; s;)
for (PyThreadState* s = PyInterpreterState_ThreadHead(tstate->interp), *old = nullptr; s;)
{
if (s == tstate)
{
@ -230,7 +230,7 @@ void Effect::run()
msleep(100);
Py_END_ALLOW_THREADS;
s = tstate->interp->tstate_head;
s = PyInterpreterState_ThreadHead(tstate->interp);
}
// Clean up the thread state