obs-scripting: Fix compiler warnings

* obs-scripting: Fix unused 'varargs' warning

* obs-scripting: Fix PyEval deprecation warnings
Remove PyEval_InitThreads() and PyEval_ThreadsInitialized() call for
Python 3.7 and later as Python calls it automatically now.

This removes deprecation warnings when using Python 3.9 or later.

https://docs.python.org/3/c-api/init.html#c.PyEval_InitThreads
This commit is contained in:
tytan652
2022-05-04 01:37:10 -07:00
committed by Jim
parent f4809b614e
commit c98617849a
2 changed files with 22 additions and 0 deletions
+2
View File
@@ -1644,9 +1644,11 @@ bool obs_scripting_load_python(const char *python_path)
dstr_free(&old_path);
#endif
#if PY_VERSION_HEX < 0x03070000
PyEval_InitThreads();
if (!PyEval_ThreadsInitialized())
return false;
#endif
/* ---------------------------------------------- */
/* Must set arguments for guis to work */