Build: resolve error with Python 3.13

Follow up to !147783, it should have included 3.13 in the version range.
This commit is contained in:
Campbell Barton
2025-10-14 09:11:07 +11:00
parent 1b73a53d0c
commit 8bb10b2d33
2 changed files with 5 additions and 3 deletions

View File

@@ -14,9 +14,9 @@
#include "BLI_utildefines.h" /* IWYU pragma: keep. */
#include "python_compat.hh" /* IWYU pragma: keep. */
#if PY_VERSION_HEX >= 0x030e0000 /* >=3.14 */
#if PY_VERSION_HEX >= 0x030d0000 /* >=3.14 */
/* Removed in Python 3.14. */
/* Removed in Python 3.13. */
int _PyArg_CheckPositional(const char *name, Py_ssize_t nargs, Py_ssize_t min, Py_ssize_t max)
{
BLI_assert(min >= 0);

View File

@@ -49,6 +49,8 @@
# define Py_HashPointer _Py_HashPointer
# define PyThreadState_GetUnchecked _PyThreadState_UncheckedGet
/* TODO: Support: `PyDict_Pop`, it has different arguments. */
#else /* >= 3.14 */
#endif
#if PY_VERSION_HEX >= 0x030d0000 /* >= 3.13 */
int _PyArg_CheckPositional(const char *name, Py_ssize_t nargs, Py_ssize_t min, Py_ssize_t max);
#endif