diff options
author | Marco Pesenti Gritti <marco@localhost.localdomain> | 2006-10-12 10:47:17 (GMT) |
---|---|---|
committer | Marco Pesenti Gritti <marco@localhost.localdomain> | 2006-10-12 10:47:17 (GMT) |
commit | 62a46ff92b234d07437f9f36efea576996eb84e2 (patch) | |
tree | 8bcb898523a5c907e38eb4fc006a2e31d814cef8 /lib/python/_sugarmodule.c | |
parent | 5cc6ee3235b6b1301f14f7aae9d1a36abef45557 (diff) |
Create a private sugar lib and put our extensions there.
Diffstat (limited to 'lib/python/_sugarmodule.c')
-rw-r--r-- | lib/python/_sugarmodule.c | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/python/_sugarmodule.c b/lib/python/_sugarmodule.c new file mode 100644 index 0000000..4d8511b --- /dev/null +++ b/lib/python/_sugarmodule.c @@ -0,0 +1,27 @@ +#ifdef HAVE_CONFIG_H +#include "config.h" +#endif + +/* include this first, before NO_IMPORT_PYGOBJECT is defined */ +#include <pygobject.h> + +void py_sugar_register_classes (PyObject *d); + +extern PyMethodDef py_sugar_functions[]; + +DL_EXPORT(void) +init_sugar(void) +{ + PyObject *m, *d; + + init_pygobject (); + + m = Py_InitModule ("_sugar", py_sugar_functions); + d = PyModule_GetDict (m); + + py_sugar_register_classes (d); + + if (PyErr_Occurred ()) { + Py_FatalError ("can't initialise module globalkeys"); + } +} |