Skip to content

Commit

Permalink
Avoid deprecated PyEval_InitThreads (#185)
Browse files Browse the repository at this point in the history
warning: 'void PyEval_InitThreads()' is deprecated [-Wdeprecated-declarations]
  • Loading branch information
jschueller authored Nov 20, 2023
1 parent 61e4cc5 commit c63e614
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pythonfmu/pythonfmu-export/src/pythonfmu/PyState.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ class PyState
if (!was_initialized_) {
Py_SetProgramName(L"./PythonFMU");
Py_Initialize();
#if PY_VERSION_HEX < 0x03070000
PyEval_InitThreads();
#endif
_mainPyThread = PyEval_SaveThread();
}
}
Expand Down

0 comments on commit c63e614

Please sign in to comment.