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