Skip to content

Commit 463d5b1

Browse files
committed
Fix argument types of unstable C-API function calls in Py3.13.
1 parent 456e6d4 commit 463d5b1

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/quicktions.pyx

+2-2
Original file line numberDiff line numberDiff line change
@@ -95,11 +95,11 @@ cdef pow10(long long i):
9595
cdef extern from *:
9696
"""
9797
#if PY_VERSION_HEX >= 0x030c00a5 && defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue)
98-
#define __Quicktions_PyLong_IsCompact(x) PyUnstable_Long_IsCompact(x)
98+
#define __Quicktions_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) (x))
9999
#if CYTHON_COMPILING_IN_CPYTHON
100100
#define __Quicktions_PyLong_CompactValueUnsigned(x) ((unsigned long long) (((PyLongObject*)x)->long_value.ob_digit[0]))
101101
#else
102-
#define __Quicktions_PyLong_CompactValueUnsigned(x) ((unsigned long long) PyUnstable_Long_CompactValue(x)))
102+
#define __Quicktions_PyLong_CompactValueUnsigned(x) ((unsigned long long) PyUnstable_Long_CompactValue((PyLongObject*) (x))))
103103
#endif
104104
#elif PY_VERSION_HEX < 0x030c0000 && CYTHON_COMPILING_IN_CPYTHON
105105
#define __Quicktions_PyLong_IsCompact(x) (Py_SIZE(x) == 0 || Py_SIZE(x) == 1 || Py_SIZE(x) == -1)

0 commit comments

Comments
 (0)