]> git.ipfire.org Git - people/ms/libloc.git/blobdiff - src/python/locationmodule.c
python: Add Writer class
[people/ms/libloc.git] / src / python / locationmodule.c
index 67f796df7d025d3d27cffe69fe9aa2683af08f9f..f4ea6cf6602000c66193740dc503c85cca8178c1 100644 (file)
@@ -19,6 +19,7 @@
 #include "locationmodule.h"
 #include "as.h"
 #include "database.h"
+#include "writer.h"
 
 PyMODINIT_FUNC PyInit_location(void);
 
@@ -65,5 +66,12 @@ PyMODINIT_FUNC PyInit_location(void) {
        Py_INCREF(&DatabaseType);
        PyModule_AddObject(m, "Database", (PyObject *)&DatabaseType);
 
+       // Writer
+       if (PyType_Ready(&WriterType) < 0)
+               return NULL;
+
+       Py_INCREF(&WriterType);
+       PyModule_AddObject(m, "Writer", (PyObject *)&WriterType);
+
        return m;
 }