slackbuilds_ponce/graphics/zbar/zbar-0.23.90-python3.11.patch
Matteo Bernardini 30b4d98bfa 20241116.1 global branch merge.
Signed-off-by: Matteo Bernardini <ponce@slackbuilds.org>
2024-11-16 14:53:18 +01:00

27 lines
937 B
Diff

diff -ruN a/python/enum.c b/python/enum.c
--- a/python/enum.c 2021-02-14 17:03:07.000000000 +0100
+++ b/python/enum.c 2023-04-06 20:43:21.153825509 +0200
@@ -52,7 +52,11 @@
/* we assume the "fast path" for a single-digit ints (see longobject.c) */
/* this also holds if we get a small_int preallocated long */
+#if PY_VERSION_HEX >= 0x030900A4
+ Py_SET_SIZE(&self->val, Py_SIZE(longval));
+#else
Py_SIZE(&self->val) = Py_SIZE(longval);
+#endif
self->val.ob_digit[0] = longval->ob_digit[0];
Py_DECREF(longval);
#else
@@ -143,7 +147,11 @@
/* we assume the "fast path" for a single-digit ints (see longobject.c) */
/* this also holds if we get a small_int preallocated long */
+#if PY_VERSION_HEX >= 0x030900A4
+ Py_SET_SIZE(&self->val, Py_SIZE(longval));
+#else
Py_SIZE(&self->val) = Py_SIZE(longval);
+#endif
self->val.ob_digit[0] = longval->ob_digit[0];
Py_DECREF(longval);