summaryrefslogtreecommitdiffstats
path: root/gobject/pygmainloop.c
diff options
context:
space:
mode:
Diffstat (limited to 'gobject/pygmainloop.c')
-rw-r--r--gobject/pygmainloop.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/gobject/pygmainloop.c b/gobject/pygmainloop.c
index 90357f2..5453240 100644
--- a/gobject/pygmainloop.c
+++ b/gobject/pygmainloop.c
@@ -228,17 +228,7 @@ pyg_main_loop_compare(PyGMainLoop *self, PyGMainLoop *v)
static PyObject *
_wrap_g_main_loop_get_context (PyGMainLoop *loop)
{
- PyGMainContext *self;
-
- self = (PyGMainContext *)PyObject_NEW(PyGMainContext,
- &PyGMainContext_Type);
-
- self->context = g_main_loop_get_context(loop->loop);
-
- if (self->context == NULL)
- return NULL;
-
- return (PyObject *)self;
+ return pyg_main_context_new(g_main_loop_get_context(loop->loop));
}
static PyObject *