mirror of
https://github.com/obsproject/obs-studio.git
synced 2026-09-01 15:49:51 +08:00
obs-scripting: Add PyType_Modified import for Swig 4.1.1 compat
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user