]> git.0d.be Git - empathy.git/blob - python/pyempathy/pyempathymodule.c
59c093c8367911a8bccfc1bb1754131d6c1b5080
[empathy.git] / python / pyempathy / pyempathymodule.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) initempathy(void);
8 extern PyMethodDef empathy_functions[];
9
10 DL_EXPORT(void)
11 initempathy(void)
12 {
13         PyObject *m, *d;
14
15         init_pygobject ();
16         
17         m = Py_InitModule ("empathy", empathy_functions);
18         d = PyModule_GetDict (m);
19         
20         empathy_register_classes (d);
21         empathy_add_constants(m, "EMPATHY_");
22         
23         if (PyErr_Occurred ()) {
24                 PyErr_Print();
25                 Py_FatalError ("can't initialise module empathy");
26         }
27 }
28