obs-scripting: Replace OBS_UNUSED with UNUSED_PARAMETER

OBS_UNUSED is not portable to MSVC.
This commit is contained in:
tytan652 2022-07-19 19:30:51 +02:00
parent 057e433bdb
commit ba6f9f3f46

View File

@ -233,9 +233,12 @@ extern bool import_python(const char *python_path);
#define _Py_NoneStruct (*Import__Py_NoneStruct) #define _Py_NoneStruct (*Import__Py_NoneStruct)
#define PyTuple_New Import_PyTuple_New #define PyTuple_New Import_PyTuple_New
#if PY_VERSION_HEX >= 0x030800f0 #if PY_VERSION_HEX >= 0x030800f0
static inline void Import__Py_DECREF(const char *filename OBS_UNUSED, static inline void Import__Py_DECREF(const char *filename, int lineno,
int lineno OBS_UNUSED, PyObject *op) PyObject *op)
{ {
UNUSED_PARAMETER(filename);
UNUSED_PARAMETER(lineno);
if (--op->ob_refcnt != 0) { if (--op->ob_refcnt != 0) {
#ifdef Py_REF_DEBUG #ifdef Py_REF_DEBUG
if (op->ob_refcnt < 0) { if (op->ob_refcnt < 0) {