Python 3.9 support
Remove PyEval_InitThreads() call for Python 3.7 and later as Python calls it automatically now. This removes a deprecation warning when using Python 3.9. https://docs.python.org/3/c-api/init.html#c.PyEval_InitThreads
This commit is contained in:
parent
01a2d5fe4c
commit
9c50887daa
2 changed files with 10 additions and 2 deletions
|
|
@ -8,8 +8,12 @@
|
|||
# define SWIG_PYTHON_USE_GIL
|
||||
# endif
|
||||
# if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */
|
||||
# ifndef SWIG_PYTHON_INITIALIZE_THREADS
|
||||
# define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads()
|
||||
# if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
|
||||
# if PY_VERSION_HEX < 0x03070000
|
||||
# define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads()
|
||||
# else
|
||||
# define SWIG_PYTHON_INITIALIZE_THREADS
|
||||
# endif
|
||||
# endif
|
||||
# ifdef __cplusplus /* C++ code */
|
||||
class SWIG_Python_Thread_Block {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue