obs-scripting: Add PyType_Modified import for Swig 4.1.1 compat

This commit is contained in:
PatTheMav
2023-01-31 14:28:10 +01:00
committed by Jim
parent 945deec266
commit 318db2842a
2 changed files with 3 additions and 0 deletions
+1
View File
@@ -116,6 +116,7 @@ bool import_python(const char *python_path, python_version_t *python_version)
} while (false)
IMPORT_FUNC(PyType_Ready);
IMPORT_FUNC(PyType_Modified);
IMPORT_FUNC(PyObject_GenericGetAttr);
IMPORT_FUNC(PyObject_IsTrue);
IMPORT_FUNC(Py_DecRef);
+2
View File
@@ -57,6 +57,7 @@ typedef struct python_version {
PY_EXTERN int (*Import_PyType_Ready)(PyTypeObject *);
PY_EXTERN PyObject *(*Import_PyObject_GenericGetAttr)(PyObject *, PyObject *);
PY_EXTERN void (*Import_PyType_Modified)(PyTypeObject *);
PY_EXTERN int (*Import_PyObject_IsTrue)(PyObject *);
PY_EXTERN void (*Import_Py_DecRef)(PyObject *);
PY_EXTERN void *(*Import_PyObject_Malloc)(size_t size);
@@ -153,6 +154,7 @@ extern bool import_python(const char *python_path,
#ifndef NO_REDEFS
#define PyType_Ready Import_PyType_Ready
#define PyType_GetFlags Import_PyType_GetFlags
#define PyType_Modified Import_PyType_Modified
#define PyObject_GenericGetAttr Import_PyObject_GenericGetAttr
#define PyObject_IsTrue Import_PyObject_IsTrue
#define Py_DecRef Import_Py_DecRef