Skip to content

Commit 3ff39dd

Browse files
committed
Avoid useless macro usage in Py>=3.12 and Limited API.
1 parent e6223ea commit 3ff39dd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/quicktions.pyx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1842,7 +1842,9 @@ cdef extern from *:
18421842
18431843
static CYTHON_INLINE int __QUICKTIONS_unpack_ustring(
18441844
PyObject* string, Py_ssize_t *length, void** data, int *kind) {
1845-
if (__Pyx_PyUnicode_READY(string) < 0) return -1;
1845+
#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030c0000
1846+
if (PyUnicode_READY(string) < 0) return -1;
1847+
#endif
18461848
*kind = __Pyx_PyUnicode_KIND(string);
18471849
*length = __Pyx_PyUnicode_GET_LENGTH(string);
18481850

0 commit comments

Comments
 (0)