Change the vals in gpiod_Line_set_value from a tuple of tuples to just a tuple. This brings it into line with other vals in the module such as gpiod_Line_set_config and gpiod_Line_set_direction_output. The previous usage made the vals equivalent to an args (a tuple of arguments equivalent to argc,argv in C), as per gpiod_Line_set_flags. Renaming vals to args in gpiod_Line_set_value was not an option as there is already an args parameter. Signed-off-by: Kent Gibson <warthog618@xxxxxxxxx> --- bindings/python/gpiodmodule.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bindings/python/gpiodmodule.c b/bindings/python/gpiodmodule.c index 6086715..5f74513 100644 --- a/bindings/python/gpiodmodule.c +++ b/bindings/python/gpiodmodule.c @@ -585,14 +585,14 @@ static PyObject *gpiod_Line_set_value(gpiod_LineObject *self, PyObject *args) if (!bulk_obj) return NULL; - vals = Py_BuildValue("((O))", val); + vals = Py_BuildValue("(O)", val); if (!vals) { Py_DECREF(bulk_obj); return NULL; } ret = PyObject_CallMethod((PyObject *)bulk_obj, - "set_values", "O", vals); + "set_values", "(O)", vals); Py_DECREF(bulk_obj); Py_DECREF(vals); -- 2.24.0