mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-09-24 23:31:36 +08:00
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:
+2
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user