summaryrefslogtreecommitdiff
path: root/dev-python/pyalsa/files/pyalsa-1.2.7-python3.12.patch
diff options
context:
space:
mode:
authorLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2024-06-03 06:02:01 +0000
committerLiguros - Gitlab CI/CD [develop] <gitlab@liguros.net>2024-06-03 06:02:01 +0000
commit885327c662003fc1e1edb225193dbc3509988ac6 (patch)
tree615244bd1f16a28724196d2048ce2e6ac9aaed76 /dev-python/pyalsa/files/pyalsa-1.2.7-python3.12.patch
parent06e23fb65b36eb2043b184191947db2c856fba50 (diff)
downloadbaldeagleos-repo-885327c662003fc1e1edb225193dbc3509988ac6.tar.gz
baldeagleos-repo-885327c662003fc1e1edb225193dbc3509988ac6.tar.xz
baldeagleos-repo-885327c662003fc1e1edb225193dbc3509988ac6.zip
Adding metadata
Diffstat (limited to 'dev-python/pyalsa/files/pyalsa-1.2.7-python3.12.patch')
-rw-r--r--dev-python/pyalsa/files/pyalsa-1.2.7-python3.12.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/dev-python/pyalsa/files/pyalsa-1.2.7-python3.12.patch b/dev-python/pyalsa/files/pyalsa-1.2.7-python3.12.patch
new file mode 100644
index 000000000000..f27a7714a986
--- /dev/null
+++ b/dev-python/pyalsa/files/pyalsa-1.2.7-python3.12.patch
@@ -0,0 +1,34 @@
+https://github.com/alsa-project/alsa-python/issues/9
+https://github.com/alsa-project/alsa-python/pull/10
+https://github.com/alsa-project/alsa-python/commit/cb75f5cdba0a29bdfa43eb56285da4917d2941a9
+
+From cb75f5cdba0a29bdfa43eb56285da4917d2941a9 Mon Sep 17 00:00:00 2001
+From: Francesco Ceruti <ceppofrancy@gmail.com>
+Date: Sat, 4 May 2024 22:16:16 +0200
+Subject: [PATCH] alsaseq: fix seg. fault when accessing `ConstantObject` extra
+
+Closes: https://github.com/alsa-project/alsa-python/pull/10
+Signed-off-by: Francesco Ceruti <ceppofrancy@gmail.com>
+Signed-off-by: Jaroslav Kysela <perex@perex.cz>
+--- a/pyalsa/alsaseq.c
++++ b/pyalsa/alsaseq.c
+@@ -353,18 +353,11 @@ typedef struct {
+ } ConstantObject;
+
+ #if PY_MAJOR_VERSION < 3
+-/* PyInt is fixed size in Python 2 */
+ # define CONST_VALUE(x) PyInt_AsLong((PyObject *)x)
+-# define CONST_EXTRA(x) (&(x->extra))
+ #else
+-/* PyLong is variable size in Python 3 */
+ # define CONST_VALUE(x) PyLong_AsLong((PyObject *)x)
+-# define CONST_EXTRA(x) \
+- ((ConstantExtraFields *)( \
+- ((intptr_t)(&x->extra)) \
+- + abs(Py_SIZE(&x->base)) * Py_TYPE(x)->tp_itemsize \
+- ))
+ #endif
++# define CONST_EXTRA(x) (&(x->extra))
+
+ /** alsaseq.Constant type (initialized later...) */
+ static PyTypeObject ConstantType;