Skip to content

Commit 56e2adc

Browse files
committed
reader: drop kwargs declaration in the _reader.Journal.add_match registration
Drop specification of kwargs in the _reader.Journal.add_match registration. The handling was never implemented, so any any kwargs would be summarilly ignored. The handling of kwargs is done in the python wrapper, so no kwargs are passed to the native C function (and would be ignored if they were). IIRC, the plan was initially to do this in the C extension, but then we realized that this is very much not a hot path and doing in the the wrapper is just fine.
1 parent 87e9eda commit 56e2adc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/systemd/_reader.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,7 @@ PyDoc_STRVAR(Reader_add_match__doc__,
727727
"fields are combined with logical AND, and matches of the same field\n"
728728
"are automatically combined with logical OR.\n"
729729
"Match is a string of the form \"FIELD=value\".");
730-
static PyObject* Reader_add_match(Reader *self, PyObject *args, PyObject *keywds) {
730+
static PyObject* Reader_add_match(Reader *self, PyObject *args) {
731731
char *match;
732732
Py_ssize_t match_len;
733733
int r;
@@ -1342,7 +1342,7 @@ static PyMethodDef Reader_methods[] = {
13421342
{"_get_all", (PyCFunction) Reader_get_all, METH_NOARGS, Reader_get_all__doc__},
13431343
{"_get_realtime", (PyCFunction) Reader_get_realtime, METH_NOARGS, Reader_get_realtime__doc__},
13441344
{"_get_monotonic", (PyCFunction) Reader_get_monotonic, METH_NOARGS, Reader_get_monotonic__doc__},
1345-
{"add_match", (PyCFunction) Reader_add_match, METH_VARARGS|METH_KEYWORDS, Reader_add_match__doc__},
1345+
{"add_match", (PyCFunction) Reader_add_match, METH_VARARGS, Reader_add_match__doc__},
13461346
{"add_disjunction", (PyCFunction) Reader_add_disjunction, METH_NOARGS, Reader_add_disjunction__doc__},
13471347
{"add_conjunction", (PyCFunction) Reader_add_conjunction, METH_NOARGS, Reader_add_conjunction__doc__},
13481348
{"flush_matches", (PyCFunction) Reader_flush_matches, METH_NOARGS, Reader_flush_matches__doc__},

0 commit comments

Comments
 (0)