diff options
author | Johan Dahlin <jdahlin@telia.com> | 2001-12-14 11:00:12 +0000 |
---|---|---|
committer | Johan Dahlin <zilch@src.gnome.org> | 2001-12-14 11:00:12 +0000 |
commit | ee17ffaba542167c2a97bcfc1f563618d4536993 (patch) | |
tree | ee9581f55e78e3ce1a146186a588834db70be5bf | |
parent | 1ce66bbaf5573c0ec27ed83c37c79f574e5d7e27 (diff) | |
download | pygobject-ee17ffaba542167c2a97bcfc1f563618d4536993.tar.gz pygobject-ee17ffaba542167c2a97bcfc1f563618d4536993.tar.xz pygobject-ee17ffaba542167c2a97bcfc1f563618d4536993.zip |
Add gobject.glib_version.
2001-12-14 Johan Dahlin <jdahlin@telia.com>
* gobjectmodule.c (initgobject): Add gobject.glib_version.
-rw-r--r-- | gobject/gobjectmodule.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/gobject/gobjectmodule.c b/gobject/gobjectmodule.c index c42b367..295b3d1 100644 --- a/gobject/gobjectmodule.c +++ b/gobject/gobjectmodule.c @@ -2514,7 +2514,7 @@ static struct _PyGObject_Functions functions = { DL_EXPORT(void) initgobject(void) { - PyObject *m, *d, *o; + PyObject *m, *d, *o, *tuple; PyGTypeWrapper_Type.ob_type = &PyType_Type; PyGParamSpec_Type.ob_type = &PyType_Type; @@ -2556,6 +2556,11 @@ initgobject(void) boxed_marshalers = g_hash_table_new(g_direct_hash, g_direct_equal); + tuple = Py_BuildValue ("(iii)", glib_major_version, glib_minor_version, + glib_micro_version); + PyDict_SetItemString(d, "glib_version", tuple); + Py_DECREF(tuple); + /* for addon libraries ... */ PyDict_SetItemString(d, "_PyGObject_API", PyCObject_FromVoidPtr(&functions, NULL)); |