archrelease: copy trunk to extra-x86_64
[arch-packages.git] / zbar / repos / extra-x86_64 / zbar-0.23.90-python3.11.patch
blob150f84ac22e12030ef07fc886d5bb7365e28be48
1 diff -ruN a/python/enum.c b/python/enum.c
2 --- a/python/enum.c 2021-02-14 17:03:07.000000000 +0100
3 +++ b/python/enum.c 2023-04-06 20:43:21.153825509 +0200
4 @@ -52,7 +52,11 @@
6 /* we assume the "fast path" for a single-digit ints (see longobject.c) */
7 /* this also holds if we get a small_int preallocated long */
8 +#if PY_VERSION_HEX >= 0x030900A4
9 + Py_SET_SIZE(&self->val, Py_SIZE(longval));
10 +#else
11 Py_SIZE(&self->val) = Py_SIZE(longval);
12 +#endif
13 self->val.ob_digit[0] = longval->ob_digit[0];
14 Py_DECREF(longval);
15 #else
16 @@ -143,7 +147,11 @@
18 /* we assume the "fast path" for a single-digit ints (see longobject.c) */
19 /* this also holds if we get a small_int preallocated long */
20 +#if PY_VERSION_HEX >= 0x030900A4
21 + Py_SET_SIZE(&self->val, Py_SIZE(longval));
22 +#else
23 Py_SIZE(&self->val) = Py_SIZE(longval);
24 +#endif
25 self->val.ob_digit[0] = longval->ob_digit[0];
26 Py_DECREF(longval);