Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:15.5:Update
python3-alsa.29613
0002-Fix-PyTuple_SET_ITEM-usage-no-return-value...
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0002-Fix-PyTuple_SET_ITEM-usage-no-return-value.patch of Package python3-alsa.29613
From 5ea2f8709b4d091700750661231f8a3ddce0fc7c Mon Sep 17 00:00:00 2001 From: Jaroslav Kysela <perex@perex.cz> Date: Thu, 10 Dec 2020 16:00:50 +0100 Subject: [PATCH] Fix PyTuple_SET_ITEM() usage - no return value As noted in bpo-30459 (link bellow) the PyTuple_SET_ITEM() macro has not a return value. Let's make code compatible with python 3.10. Link: https://bugs.python.org/issue30459 BugLink: https://github.com/alsa-project/alsa-python/issues/2 Signed-off-by: Jaroslav Kysela <perex@perex.cz> --- pyalsa/alsahcontrol.c | 4 ++-- pyalsa/alsamixer.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pyalsa/alsahcontrol.c b/pyalsa/alsahcontrol.c index ebee1b7c094a..7c9321f811a0 100644 --- a/pyalsa/alsahcontrol.c +++ b/pyalsa/alsahcontrol.c @@ -1543,8 +1543,8 @@ static int element_callback(snd_hctl_elem_t *elem, unsigned int mask) t = PyTuple_New(2); if (t) { - if (PyTuple_SET_ITEM(t, 0, (PyObject *)pyhelem)) - Py_INCREF(pyhelem); + PyTuple_SET_ITEM(t, 0, (PyObject *)pyhelem); + Py_INCREF(pyhelem); PyTuple_SET_ITEM(t, 1, PyInt_FromLong(mask)); r = PyObject_CallObject(o, t); Py_DECREF(t); diff --git a/pyalsa/alsamixer.c b/pyalsa/alsamixer.c index 39d7387500c4..91fe198c7b37 100644 --- a/pyalsa/alsamixer.c +++ b/pyalsa/alsamixer.c @@ -1348,8 +1348,8 @@ static int element_callback(snd_mixer_elem_t *elem, unsigned int mask) t = PyTuple_New(2); if (t) { - if (PyTuple_SET_ITEM(t, 0, (PyObject *)pyelem)) - Py_INCREF(pyelem); + PyTuple_SET_ITEM(t, 0, (PyObject *)pyelem); + Py_INCREF(pyelem); PyTuple_SET_ITEM(t, 1, PyInt_FromLong(mask)); r = PyObject_CallObject(o, t); Py_DECREF(t); -- 2.31.1
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor