diff options
author | Stefan Metzmacher <metze@samba.org> | 2015-06-11 09:49:18 +0200 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2015-06-12 17:08:19 +0200 |
commit | 1a8a5ba0d51f9c2c9e84a3400e05327e7059156b (patch) | |
tree | 08589f593be42f2bf3c675f736506379ba76259f /lib | |
parent | 2216141ff8a204c8b41293a19e9ce86308b0424f (diff) | |
download | samba-1a8a5ba0d51f9c2c9e84a3400e05327e7059156b.tar.gz |
pytevent: remove dead code TEVENT_DEPRECATED is never defined
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'lib')
-rw-r--r-- | lib/tevent/pytevent.c | 48 |
1 files changed, 0 insertions, 48 deletions
diff --git a/lib/tevent/pytevent.c b/lib/tevent/pytevent.c index 5725ae3d752..7f9eaf12a06 100644 --- a/lib/tevent/pytevent.c +++ b/lib/tevent/pytevent.c @@ -295,38 +295,6 @@ static PyObject *py_tevent_context_loop_once(TeventContext_Object *self) Py_RETURN_NONE; } -#ifdef TEVENT_DEPRECATED -static bool py_tevent_finished(PyObject *callback) -{ - PyObject *py_ret; - bool ret; - - py_ret = PyObject_CallFunction(callback, ""); - if (py_ret == NULL) - return true; - ret = PyObject_IsTrue(py_ret); - Py_DECREF(py_ret); - return ret; -} - -static PyObject *py_tevent_context_loop_until(TeventContext_Object *self, PyObject *args) -{ - PyObject *callback; - if (!PyArg_ParseTuple(args, "O", &callback)) - return NULL; - - if (tevent_loop_until(self->ev, py_tevent_finished, callback) != 0) { - PyErr_SetNone(PyExc_RuntimeError); - return NULL; - } - - if (PyErr_Occurred()) - return NULL; - - Py_RETURN_NONE; -} -#endif - static void py_tevent_signal_handler(struct tevent_context *ev, struct tevent_signal *se, int signum, @@ -576,14 +544,6 @@ static PyObject *py_tevent_context_add_fd(TeventContext_Object *self, PyObject * return (PyObject *)ret; } -#ifdef TEVENT_DEPRECATED -static PyObject *py_tevent_context_set_allow_nesting(TeventContext_Object *self) -{ - tevent_loop_allow_nesting(self->ev); - Py_RETURN_NONE; -} -#endif - static PyMethodDef py_tevent_context_methods[] = { { "reinitialise", (PyCFunction)py_tevent_context_reinitialise, METH_NOARGS, "S.reinitialise()" }, @@ -593,10 +553,6 @@ static PyMethodDef py_tevent_context_methods[] = { METH_NOARGS, "S.loop_wait()" }, { "loop_once", (PyCFunction)py_tevent_context_loop_once, METH_NOARGS, "S.loop_once()" }, -#ifdef TEVENT_DEPRECATED - { "loop_until", (PyCFunction)py_tevent_context_loop_until, - METH_VARARGS, "S.loop_until(callback)" }, -#endif { "add_signal", (PyCFunction)py_tevent_context_add_signal, METH_VARARGS, "S.add_signal(signum, sa_flags, handler) -> signal" }, { "add_timer", (PyCFunction)py_tevent_context_add_timer, @@ -605,10 +561,6 @@ static PyMethodDef py_tevent_context_methods[] = { METH_VARARGS, "S.add_timer(offset_seconds, handler) -> timer" }, { "add_fd", (PyCFunction)py_tevent_context_add_fd, METH_VARARGS, "S.add_fd(fd, flags, handler) -> fd" }, -#ifdef TEVENT_DEPRECATED - { "allow_nesting", (PyCFunction)py_tevent_context_set_allow_nesting, - METH_NOARGS, "Whether to allow nested tevent loops." }, -#endif { NULL }, }; |