Pretty print date in query output.
[beagle.git] / wrappers / python / beaglemodule.c
blob77bfc2f3474dd282247e19fb1ecdbd1198035da3
1 /* -*- Mode: C; c-basic-offset: 4 -*- */
2 #ifdef HAVE_CONFIG_H
3 # include "config.h"
4 #endif
6 /* include this first, before NO_IMPORT_PYGOBJECT is defined */
7 #include <pygobject.h>
9 /* include any extra headers needed here */
10 #include <beagle/beagle.h>
12 void pybeagle_register_classes(PyObject *d);
13 void pybeagle_add_constants(PyObject *module, const gchar *strip_prefix);
14 extern PyMethodDef pybeagle_functions[];
16 DL_EXPORT(void)
17 initbeagle(void)
19 PyObject *m, *d;
21 /* perform any initialisation required by the library here */
22 init_pygobject();
24 m = Py_InitModule("beagle", pybeagle_functions);
25 d = PyModule_GetDict(m);
27 /* add anything else to the module dictionary (such as constants) */
28 pybeagle_register_classes(d);
29 pybeagle_add_constants(m, "BEAGLE_");
31 if (PyErr_Occurred())
32 Py_FatalError("could not initialise module beagle");