]> arthur.barton.de Git - bup.git/commitdiff
_helpers: remove empty PyArg_ParseTuple() from METH_NOARGS
authorJohannes Berg <johannes@sipsolutions.net>
Sun, 24 Jan 2021 20:24:03 +0000 (21:24 +0100)
committerRob Browning <rlb@defaultvalue.org>
Sun, 18 Apr 2021 17:29:50 +0000 (12:29 -0500)
With METH_NOARGS, args is NULL, and thus PyArg_ParseTuple()
will segfault. Remove it, since it's unnecessary anyway.

Signed-off-by: Johannes Berg <johannes@sipsolutions.net>
Reviewed-by: Rob Browning <rlb@defaultvalue.org>
lib/bup/_helpers.c

index 5b9ace9b6bac81a32bf77cc3f382cc8bf89d865e..4ab4d4e92bd3ba5662e0928925a63fa35b99537d 100644 (file)
@@ -1938,15 +1938,11 @@ bup_set_completer_word_break_characters(PyObject *self, PyObject *args)
 static PyObject *
 bup_get_completer_word_break_characters(PyObject *self, PyObject *args)
 {
-    if (!PyArg_ParseTuple(args, ""))
-       return NULL;
     return PyBytes_FromString(rl_completer_word_break_characters);
 }
 
 static PyObject *bup_get_line_buffer(PyObject *self, PyObject *args)
 {
-    if (!PyArg_ParseTuple(args, ""))
-       return NULL;
     return PyBytes_FromString(rl_line_buffer);
 }