diff options
| -rw-r--r-- | sources/shiboken2/libshiboken/pep384impl.cpp | 4 | ||||
| -rw-r--r-- | sources/shiboken2/libshiboken/pep384impl.h | 5 |
2 files changed, 5 insertions, 4 deletions
diff --git a/sources/shiboken2/libshiboken/pep384impl.cpp b/sources/shiboken2/libshiboken/pep384impl.cpp index 6405d777a..f07cac613 100644 --- a/sources/shiboken2/libshiboken/pep384impl.cpp +++ b/sources/shiboken2/libshiboken/pep384impl.cpp @@ -641,7 +641,7 @@ PepType_GetNameStr(PyTypeObject *type) * Newly introduced convenience functions * */ -#if PY_VERSION_HEX < 0x03070000 +#if PY_VERSION_HEX < 0x03070000 || defined(Py_LIMITED_API) PyObject * PyImport_GetModule(PyObject *name) @@ -667,7 +667,7 @@ PyImport_GetModule(PyObject *name) return m; } -#endif // PY_VERSION_HEX < 0x03070000 +#endif // PY_VERSION_HEX < 0x03070000 || defined(Py_LIMITED_API) /***************************************************************************** * * Extra support for name mangling diff --git a/sources/shiboken2/libshiboken/pep384impl.h b/sources/shiboken2/libshiboken/pep384impl.h index c180a06c1..541b0e775 100644 --- a/sources/shiboken2/libshiboken/pep384impl.h +++ b/sources/shiboken2/libshiboken/pep384impl.h @@ -525,10 +525,11 @@ extern LIBSHIBOKEN_API PyTypeObject *PepMethodDescr_TypePtr; * * Newly introduced convenience functions * + * This is not defined if Py_LIMITED_API is defined. */ -#if PY_VERSION_HEX < 0x03070000 +#if PY_VERSION_HEX < 0x03070000 || defined(Py_LIMITED_API) LIBSHIBOKEN_API PyObject *PyImport_GetModule(PyObject *name); -#endif // PY_VERSION_HEX < 0x03070000 +#endif // PY_VERSION_HEX < 0x03070000 || defined(Py_LIMITED_API) /***************************************************************************** * |
