Unbreak building with Python 3.12

Support for 3.13 [0] broke 3.12.

[0]: d9f38fca5f
This commit is contained in:
Campbell Barton
2024-10-21 20:45:35 +11:00
parent 9b1c51165c
commit f60f2b769b
2 changed files with 2 additions and 2 deletions

View File

@@ -39,7 +39,7 @@
# include "BLI_math_base.h" /* isfinite() */
#endif
#if PY_VERSION_HEX <= 0x030c0000 /* <=3.12 */
#if PY_VERSION_HEX < 0x030d0000 /* <3.13 */
# define PyLong_AsInt _PyLong_AsInt
# define PyUnicode_CompareWithASCIIString _PyUnicode_EqualToASCIIString
#endif

View File

@@ -339,7 +339,7 @@ uint64_t PyC_Long_AsU64(PyObject *value);
/* inline so type signatures match as expected */
Py_LOCAL_INLINE(int32_t) PyC_Long_AsI32(PyObject *value)
{
#if PY_VERSION_HEX <= 0x030c0000 /* <=3.12 */
#if PY_VERSION_HEX < 0x030d0000 /* <3.13 */
return (int32_t)_PyLong_AsInt(value);
#else
return (int32_t)PyLong_AsInt(value);