From a402d08da41413507a4ebebf18de897f7ddf1dd2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= Date: Sun, 16 Jun 2019 19:49:54 +0200 Subject: docs: mention .process() in docstring of .fileno() Together with the previous commit, this makes it much easier to find the right docs. Fixes #48. --- systemd/_reader.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/systemd/_reader.c b/systemd/_reader.c index 3b65200..c9aa11d 100644 --- a/systemd/_reader.c +++ b/systemd/_reader.c @@ -327,7 +327,10 @@ PyDoc_STRVAR(Reader_fileno__doc__, "fileno() -> int\n\n" "Get a file descriptor to poll for changes in the journal.\n" "This method invokes sd_journal_get_fd().\n" - "See :manpage:`sd_journal_get_fd(3)`."); + "See :manpage:`sd_journal_get_fd(3)`.\n\n" + "When the file descriptor returned by this function is used a poll\n" + "loop, .process() should be used to process events and reset the readability\n" + "state of the file descriptor."); static PyObject* Reader_fileno(Reader *self, PyObject *args) { int fd; @@ -850,7 +853,7 @@ static PyObject* Reader_seek_monotonic(Reader *self, PyObject *args) { PyDoc_STRVAR(Reader_process__doc__, "process() -> state change (integer)\n\n" - "Process events and reset the readable state of the file\n" + "Process events and reset the readability state of the file\n" "descriptor returned by .fileno().\n\n" "Will return constants: NOP if no change; APPEND if new\n" "entries have been added to the end of the journal; and\n" -- cgit v1.2.1