X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fpython-systemd%2F_daemon.c;h=f0ab16f659e2367f87057da2886ab1860a51084a;hb=8e959fbf3862172b53d200cda659795c3744fa78;hp=bd4e73e9be33a329f0099440bd406484a35cd981;hpb=925d98b3441881bad3a459cb5f7f3785bab40b5c;p=elogind.git diff --git a/src/python-systemd/_daemon.c b/src/python-systemd/_daemon.c index bd4e73e9b..f0ab16f65 100644 --- a/src/python-systemd/_daemon.c +++ b/src/python-systemd/_daemon.c @@ -40,28 +40,6 @@ PyDoc_STRVAR(module__doc__, "running under systemd." ); - -#if PY_MAJOR_VERSION >=3 && PY_MINOR_VERSION >= 1 -static int Unicode_FSConverter(PyObject* obj, void *_result) { - PyObject **result = _result; - - assert(result); - - if (!obj) - /* cleanup: we don't return Py_CLEANUP_SUPPORTED, so - * we can assume that it was PyUnicode_FSConverter. */ - return PyUnicode_FSConverter(obj, result); - - if (obj == Py_None) { - *result = NULL; - return 1; - } - - return PyUnicode_FSConverter(obj, result); -} -#endif - - PyDoc_STRVAR(booted__doc__, "booted() -> bool\n\n" "Return True iff this system is running under systemd.\n" @@ -73,7 +51,7 @@ static PyObject* booted(PyObject *self, PyObject *args) { assert(args == NULL); r = sd_booted(); - if (set_error(r, NULL, NULL)) + if (set_error(r, NULL, NULL) < 0) return NULL; return PyBool_FromLong(r);