]> git.0d.be Git - empathy.git/blob - python/pyempathygtk/pyempathygtkmodule.c
20e09e3f36f1465e6d0a148dfc4be69e02bd007c
[empathy.git] / python / pyempathygtk / pyempathygtkmodule.c
1 #define NO_IMPORT_PYGOBJECT
2
3 #include <pygobject.h>
4
5 void empathy_register_classes (PyObject *d);
6 void empathy_add_constants(PyObject *module, const gchar *strip_prefix);
7 DL_EXPORT(void) initempathygtk(void);
8 extern PyMethodDef empathy_functions[];
9
10 DL_EXPORT(void) initempathygtk(void)
11 {
12         PyObject *m, *d;
13
14         init_pygobject ();
15         
16         m = Py_InitModule ("empathygtk", empathy_functions);
17         d = PyModule_GetDict (m);
18         
19         empathy_register_classes (d);
20         empathy_add_constants(m, "EMPATHY_");
21         
22         if (PyErr_Occurred ()) {
23                 PyErr_Print();
24                 Py_FatalError ("can't initialise module empathygtk");
25         }
26 }
27