From 8af954f812f78d5258cb8440b13cc6944eccf940 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Tue, 16 May 2023 08:39:06 +0200 Subject: Disable fast Py_SIZE(PyLong) check in Py3.12a7+ since it's no longer valid there. --- CHANGES.rst | 2 +- Cython/Utility/TypeConversion.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index a8746d0ac..f85b9dabd 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -8,7 +8,7 @@ Cython Changelog Bugs fixed ---------- -* Some C compile failures in CPython 3.12 were resolved. +* Some C compile failures and crashes in CPython 3.12 were resolved. * A C compile failure in PyPy 3.10 was resolved. Patch by Matti Picus. (Github issue :issue:`5408`) diff --git a/Cython/Utility/TypeConversion.c b/Cython/Utility/TypeConversion.c index 7a7bf0f79..404814907 100644 --- a/Cython/Utility/TypeConversion.c +++ b/Cython/Utility/TypeConversion.c @@ -917,7 +917,7 @@ static CYTHON_INLINE {{TYPE}} {{FROM_PY_FUNCTION}}(PyObject *x) { {{endfor}} } #endif -#if CYTHON_COMPILING_IN_CPYTHON +#if CYTHON_COMPILING_IN_CPYTHON && PY_VERSION_HEX < 0x030C00A7 if (unlikely(Py_SIZE(x) < 0)) { goto raise_neg_overflow; } -- cgit v1.2.1