From f3696da0ff3f4a0978822ace72f8fcfb0c4a789d Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Thu, 31 Jan 2019 19:55:05 +0530 Subject: [PATCH] Put the functions in the wrong place --- kitty/child-monitor.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/kitty/child-monitor.c b/kitty/child-monitor.c index 04ebfcb0b..5a9a59af1 100644 --- a/kitty/child-monitor.c +++ b/kitty/child-monitor.c @@ -1428,10 +1428,6 @@ static PyMethodDef methods[] = { METHOD(main_loop, METH_NOARGS) METHOD(mark_for_close, METH_VARARGS) METHOD(resize_pty, METH_VARARGS) - {"add_timer", (PyCFunction)add_python_timer, METH_VARARGS, ""}, - {"remove_timer", (PyCFunction)remove_python_timer, METH_VARARGS, ""}, - {"change_timer_interval", (PyCFunction)change_python_timer_interval, METH_VARARGS, ""}, - {"set_iutf8", (PyCFunction)pyset_iutf8, METH_VARARGS, ""}, {NULL} /* Sentinel */ }; @@ -1447,6 +1443,8 @@ PyTypeObject ChildMonitor_Type = { .tp_new = new, }; + + static PyObject* safe_pipe(PYNOARG) { int fds[2] = {0}; @@ -1456,6 +1454,10 @@ safe_pipe(PYNOARG) { static PyMethodDef module_methods[] = { METHODB(safe_pipe, METH_NOARGS), + {"add_timer", (PyCFunction)add_python_timer, METH_VARARGS, ""}, + {"remove_timer", (PyCFunction)remove_python_timer, METH_VARARGS, ""}, + {"change_timer_interval", (PyCFunction)change_python_timer_interval, METH_VARARGS, ""}, + {"set_iutf8", (PyCFunction)pyset_iutf8, METH_VARARGS, ""}, {NULL} /* Sentinel */ };