summaryrefslogtreecommitdiff
path: root/src/python-systemd/_reader.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-04-18 19:37:26 -0400
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2013-04-18 19:38:28 -0400
commit7f876bc4281145e6c74e98de07c6648a5b51ed90 (patch)
treed9cdb9eba09b1e15fd43a76c1c22f1b662d11df5 /src/python-systemd/_reader.c
parentf333fbb1efc2f32527f78cbdb003d59bae01aa07 (diff)
systemd-python: wrap sd_journal_add_conjunction
Diffstat (limited to 'src/python-systemd/_reader.c')
-rw-r--r--src/python-systemd/_reader.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/src/python-systemd/_reader.c b/src/python-systemd/_reader.c
index 05993b33cd..b836597746 100644
--- a/src/python-systemd/_reader.c
+++ b/src/python-systemd/_reader.c
@@ -567,7 +567,10 @@ static PyObject* Reader_add_match(Reader *self, PyObject *args, PyObject *keywds
PyDoc_STRVAR(Reader_add_disjunction__doc__,
"add_disjunction() -> None\n\n"
- "Inserts a logical OR between matches added before and afterwards.");
+ "Inserts a logical OR between matches added since previous\n"
+ "add_disjunction() or add_conjunction() and the next\n"
+ "add_disjunction() or add_conjunction().\n\n"
+ "See man:sd_journal_add_disjunction(3) for explanation.");
static PyObject* Reader_add_disjunction(Reader *self, PyObject *args)
{
int r;
@@ -579,6 +582,23 @@ static PyObject* Reader_add_disjunction(Reader *self, PyObject *args)
}
+PyDoc_STRVAR(Reader_add_conjunction__doc__,
+ "add_conjunction() -> None\n\n"
+ "Inserts a logical AND between matches added since previous\n"
+ "add_disjunction() or add_conjunction() and the next\n"
+ "add_disjunction() or add_conjunction().\n\n"
+ "See man:sd_journal_add_disjunction(3) for explanation.");
+static PyObject* Reader_add_conjunction(Reader *self, PyObject *args)
+{
+ int r;
+ r = sd_journal_add_conjunction(self->j);
+ set_error(r, NULL, NULL);
+ if (r < 0)
+ return NULL;
+ Py_RETURN_NONE;
+}
+
+
PyDoc_STRVAR(Reader_flush_matches__doc__,
"flush_matches() -> None\n\n"
"Clear all current match filters.");
@@ -980,6 +1000,7 @@ static PyMethodDef Reader_methods[] = {
{"_get_monotonic", (PyCFunction) Reader_get_monotonic, METH_NOARGS, Reader_get_monotonic__doc__},
{"add_match", (PyCFunction) Reader_add_match, METH_VARARGS|METH_KEYWORDS, Reader_add_match__doc__},
{"add_disjunction", (PyCFunction) Reader_add_disjunction, METH_NOARGS, Reader_add_disjunction__doc__},
+ {"add_conjunction", (PyCFunction) Reader_add_conjunction, METH_NOARGS, Reader_add_conjunction__doc__},
{"flush_matches", (PyCFunction) Reader_flush_matches, METH_NOARGS, Reader_flush_matches__doc__},
{"seek_head", (PyCFunction) Reader_seek_head, METH_NOARGS, Reader_seek_head__doc__},
{"seek_tail", (PyCFunction) Reader_seek_tail, METH_NOARGS, Reader_seek_tail__doc__},