diff options
author | Michał Górny <mgorny@gentoo.org> | 2023-06-04 15:49:36 +0200 |
---|---|---|
committer | Michał Górny <mgorny@gentoo.org> | 2023-06-04 16:02:58 +0200 |
commit | a90a245bdb7fdda146d41ccbd221c9df973bc18a (patch) | |
tree | c7967d0f1d60391ef8145000c49121c68a1ba342 /dev-python/cython/files | |
parent | dev-cpp/cpp-httplib: bump to 0.12.5 (diff) | |
download | gentoo-a90a245bdb7fdda146d41ccbd221c9df973bc18a.tar.gz gentoo-a90a245bdb7fdda146d41ccbd221c9df973bc18a.tar.bz2 gentoo-a90a245bdb7fdda146d41ccbd221c9df973bc18a.zip |
dev-python/cython: Backport py3.12 fix needed for pysimdjson
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'dev-python/cython/files')
-rw-r--r-- | dev-python/cython/files/cython-3.0.0_beta3-py312-long.patch | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/dev-python/cython/files/cython-3.0.0_beta3-py312-long.patch b/dev-python/cython/files/cython-3.0.0_beta3-py312-long.patch new file mode 100644 index 000000000000..fb849eca8666 --- /dev/null +++ b/dev-python/cython/files/cython-3.0.0_beta3-py312-long.patch @@ -0,0 +1,28 @@ +From d82e4e34582e908d315b912a60d81d5759850df5 Mon Sep 17 00:00:00 2001 +From: Stefan Behnel <stefan_ml@behnel.de> +Date: Mon, 29 May 2023 21:58:15 +0200 +Subject: [PATCH] Fix the argument type passed into the new + "PyUnstable_Long_Compact*()" C-API functions in CPython 3.12. + +--- + Cython/Utility/TypeConversion.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/Cython/Utility/TypeConversion.c b/Cython/Utility/TypeConversion.c +index efc5c1373..09e87d81c 100644 +--- a/Cython/Utility/TypeConversion.c ++++ b/Cython/Utility/TypeConversion.c +@@ -149,8 +149,8 @@ static CYTHON_INLINE Py_hash_t __Pyx_PyIndex_AsHash_t(PyObject*); + ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * __Pyx_PyLong_DigitCount(x)) + + #if defined(PyUnstable_Long_IsCompact) && defined(PyUnstable_Long_CompactValue) +- #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact(x) +- #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue(x) ++ #define __Pyx_PyLong_IsCompact(x) PyUnstable_Long_IsCompact((PyLongObject*) x) ++ #define __Pyx_PyLong_CompactValue(x) PyUnstable_Long_CompactValue((PyLongObject*) x) + #else + #define __Pyx_PyLong_IsCompact(x) (((PyLongObject*)x)->long_value.lv_tag < (2 << _PyLong_NON_SIZE_BITS)) + #define __Pyx_PyLong_CompactValue(x) ((1 - (Py_ssize_t) __Pyx_PyLong_Sign(x)) * (Py_ssize_t) __Pyx_PyLong_Digits(x)[0]) +-- +2.41.0 + |