diff options
author | Simon van der Linden <svdlinden@src.gnome.org> | 2009-08-05 23:40:27 +0200 |
---|---|---|
committer | Simon van der Linden <svdlinden@src.gnome.org> | 2009-08-14 23:21:23 +0200 |
commit | 3eb0baea679113593e66e02748d199bd454e02c3 (patch) | |
tree | 0fff4b80591653d08351d911e96147ad7df0b18c /gi/gimodule.c | |
parent | 3bd5057eb652bae4d7440ce3ff573bf6e415a8e3 (diff) | |
download | pygobject-3eb0baea679113593e66e02748d199bd454e02c3.tar.gz |
Make PyGI public
Diffstat (limited to 'gi/gimodule.c')
-rw-r--r-- | gi/gimodule.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/gi/gimodule.c b/gi/gimodule.c index 41dc1111..c8a01851 100644 --- a/gi/gimodule.c +++ b/gi/gimodule.c @@ -128,10 +128,15 @@ static PyMethodDef _pygi_functions[] = { { NULL, NULL, 0 } }; +struct PyGI_API PyGI_API = { + pygi_type_find_by_info +}; + PyMODINIT_FUNC init_gi(void) { PyObject *m; + PyObject *api; m = Py_InitModule("_gi", _pygi_functions); if (m == NULL) { @@ -145,5 +150,11 @@ init_gi(void) _pygi_repository_register_types(m); _pygi_info_register_types(m); _pygi_argument_init(); + + api = PyCObject_FromVoidPtr((void *)&PyGI_API, NULL); + if (api == NULL) { + return; + } + PyModule_AddObject(m, "_API", api); } |