From 0fd62365fc104d7e6d5f3ef67800df09225a4019 Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Thu, 9 Mar 2023 12:02:14 +0000 Subject: gentoo auto-resync : 09:03:2023 - 12:02:14 --- .../zbar/files/zbar-0.23.92-py311-set-size.patch | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 media-gfx/zbar/files/zbar-0.23.92-py311-set-size.patch (limited to 'media-gfx/zbar/files') diff --git a/media-gfx/zbar/files/zbar-0.23.92-py311-set-size.patch b/media-gfx/zbar/files/zbar-0.23.92-py311-set-size.patch new file mode 100644 index 000000000000..a51193af7777 --- /dev/null +++ b/media-gfx/zbar/files/zbar-0.23.92-py311-set-size.patch @@ -0,0 +1,30 @@ +Upstream-PR: https://github.com/mchehab/zbar/pull/231 + +diff --git a/python/enum.c b/python/enum.c +index ba22ba63..4644509e 100644 +--- a/python/enum.c ++++ b/python/enum.c +@@ -50,7 +50,11 @@ static zbarEnumItem *enumitem_new(PyTypeObject *type, PyObject *args, + + /* 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 +@@ -129,7 +133,11 @@ zbarEnumItem *zbarEnumItem_New(PyObject *byname, PyObject *byvalue, int val, + + /* 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); + -- cgit v1.2.3