obs-scripting: Fix compiler warnings

master
PatTheMav 2021-10-26 17:02:46 +02:00 committed by Ryan Foster
parent 952988d9ec
commit 4c1687901e
1 changed files with 4 additions and 10 deletions

View File

@ -39,14 +39,6 @@
#include <Python.h>
#endif
#if defined(HAVE_ATTRIBUTE_UNUSED) || defined(__MINGW32__)
#if !defined(UNUSED)
#define UNUSED __attribute__((unused))
#endif
#else
#define UNUSED
#endif
#ifdef _MSC_VER
#pragma warning(pop)
#endif
@ -201,7 +193,9 @@ extern bool import_python(const char *python_path);
#define PyDict_New Import_PyDict_New
#define PyDict_GetItemString Import_PyDict_GetItemString
#define PyDict_SetItemString Import_PyDict_SetItemString
#if PY_VERSION_HEX < 0x030900b0
#define PyCFunction_NewEx Import_PyCFunction_NewEx
#endif
#define PyModule_GetDict Import_PyModule_GetDict
#define PyModule_GetNameObject Import_PyModule_GetNameObject
#define PyModule_AddObject Import_PyModule_AddObject
@ -233,8 +227,8 @@ extern bool import_python(const char *python_path);
#define _Py_NoneStruct (*Import__Py_NoneStruct)
#define PyTuple_New Import_PyTuple_New
#if PY_VERSION_HEX >= 0x030800f0
static inline void Import__Py_DECREF(const char *filename UNUSED,
int lineno UNUSED, PyObject *op)
static inline void Import__Py_DECREF(const char *filename OBS_UNUSED,
int lineno OBS_UNUSED, PyObject *op)
{
if (--op->ob_refcnt != 0) {
#ifdef Py_REF_DEBUG