[pygobject] pygmainloop: allow for extra arguments in 'quit' method



commit 29a30490ed51e347e8f57d2bf9af69400734eee8
Author: Stefano Facchini <stefano facchini gmail com>
Date:   Thu Jan 19 18:09:07 2012 +0100

    pygmainloop: allow for extra arguments in 'quit' method
    
    To allow for the common syntax:
    
        object.connect('signal-name', main_loop.quit)
    
    https://bugzilla.gnome.org/show_bug.cgi?id=668288

 gi/_glib/pygmainloop.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gi/_glib/pygmainloop.c b/gi/_glib/pygmainloop.c
index 43dcf92..eb6775e 100644
--- a/gi/_glib/pygmainloop.c
+++ b/gi/_glib/pygmainloop.c
@@ -315,7 +315,7 @@ _wrap_g_main_loop_is_running (PyGMainLoop *self)
 }
 
 static PyObject *
-_wrap_g_main_loop_quit (PyGMainLoop *self)
+_wrap_g_main_loop_quit (PyGMainLoop *self, PyObject *args, PyObject *kwargs)
 {
     g_main_loop_quit(self->loop);
     
@@ -346,7 +346,7 @@ _wrap_g_main_loop_run (PyGMainLoop *self)
 static PyMethodDef _PyGMainLoop_methods[] = {
     { "get_context", (PyCFunction)_wrap_g_main_loop_get_context, METH_NOARGS },
     { "is_running", (PyCFunction)_wrap_g_main_loop_is_running, METH_NOARGS },
-    { "quit", (PyCFunction)_wrap_g_main_loop_quit, METH_NOARGS },
+    { "quit", (PyCFunction)_wrap_g_main_loop_quit, METH_VARARGS|METH_KEYWORDS },
     { "run", (PyCFunction)_wrap_g_main_loop_run, METH_NOARGS },
     { NULL, NULL, 0 }
 };



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]