diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-03-09 12:02:14 +0000 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-03-09 12:02:14 +0000 |
commit | 0fd62365fc104d7e6d5f3ef67800df09225a4019 (patch) | |
tree | 163b4a5055e07325ae1dc4f9bbbc2021ca1b6afa /media-gfx/zbar/files | |
parent | 442eaf1780a48ddbd7a39f5a3f34d959c3c6d27e (diff) |
gentoo auto-resync : 09:03:2023 - 12:02:14
Diffstat (limited to 'media-gfx/zbar/files')
-rw-r--r-- | media-gfx/zbar/files/zbar-0.23.92-py311-set-size.patch | 30 |
1 files changed, 30 insertions, 0 deletions
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); + |