]> git.0d.be Git - empathy.git/commitdiff
Automatically wrap enums in the empathy and empathygtk python bindings
authorMike Sheldon <mike@mikeasoft.com>
Tue, 3 Mar 2009 09:34:43 +0000 (09:34 +0000)
committerXavier Claessens <xclaesse@src.gnome.org>
Tue, 3 Mar 2009 09:34:43 +0000 (09:34 +0000)
* Automatically wrap enums in the empathy and empathygtk python bindings

From: Mike Sheldon <mike@mikeasoft.com>

svn path=/trunk/; revision=2548

python/pyempathy/pyempathymodule.c
python/pyempathygtk/pyempathygtkmodule.c

index 9448665c39a393afeb4eb2cd8f8287756dde13c9..59c093c8367911a8bccfc1bb1754131d6c1b5080 100644 (file)
@@ -3,6 +3,7 @@
 #include <pygobject.h>
 
 void empathy_register_classes (PyObject *d); 
+void empathy_add_constants(PyObject *module, const gchar *strip_prefix);
 DL_EXPORT(void) initempathy(void);
 extern PyMethodDef empathy_functions[];
 
@@ -17,6 +18,7 @@ initempathy(void)
        d = PyModule_GetDict (m);
        
        empathy_register_classes (d);
+       empathy_add_constants(m, "EMPATHY_");
        
        if (PyErr_Occurred ()) {
                PyErr_Print();
index 765b46d7dba2f73ba7b711ad1e32bf699b884bb9..20e09e3f36f1465e6d0a148dfc4be69e02bd007c 100644 (file)
@@ -3,6 +3,7 @@
 #include <pygobject.h>
 
 void empathy_register_classes (PyObject *d);
+void empathy_add_constants(PyObject *module, const gchar *strip_prefix);
 DL_EXPORT(void) initempathygtk(void);
 extern PyMethodDef empathy_functions[];
 
@@ -16,6 +17,7 @@ DL_EXPORT(void) initempathygtk(void)
        d = PyModule_GetDict (m);
        
        empathy_register_classes (d);
+       empathy_add_constants(m, "EMPATHY_");
        
        if (PyErr_Occurred ()) {
                PyErr_Print();