summaryrefslogtreecommitdiffstats
path: root/gio/unixmodule.c
diff options
context:
space:
mode:
Diffstat (limited to 'gio/unixmodule.c')
-rw-r--r--gio/unixmodule.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/gio/unixmodule.c b/gio/unixmodule.c
index 7a49856..0bd3c7e 100644
--- a/gio/unixmodule.c
+++ b/gio/unixmodule.c
@@ -34,19 +34,19 @@ void pyunix_add_constants(PyObject *module, const gchar *strip_prefix);
extern PyMethodDef pyunix_functions[];
-DL_EXPORT(void)
-initunix(void)
+PYGLIB_INIT_FUNCTION(unix, "gio.unix", pyunix_functions)
{
- PyObject *m, *d;
+ PyObject *d, *pyobj_mod;
/* perform any initialisation required by the library here */
- m = Py_InitModule("gio.unix", pyunix_functions);
- d = PyModule_GetDict(m);
-
- init_pygobject();
+ d = PyModule_GetDict(module);
+ pyobj_mod = pygobject_init(-1, -1, -1);
+ if (pyobj_mod == NULL)
+ return -1;
+
pyunix_register_classes(d);
-
+ return 0;
}