]> git.ipfire.org Git - people/ms/libloc.git/blobdiff - src/python/locationmodule.c
python: Extend bindings for countries
[people/ms/libloc.git] / src / python / locationmodule.c
index 90620f7ddc5f05795404bb9acea65c26c67e1db6..3b20d670ee8e98f20ab9887038e06659713040cd 100644 (file)
@@ -19,6 +19,7 @@
 
 #include "locationmodule.h"
 #include "as.h"
+#include "country.h"
 #include "database.h"
 #include "network.h"
 #include "writer.h"
@@ -81,6 +82,13 @@ PyMODINIT_FUNC PyInit_location(void) {
        Py_INCREF(&ASType);
        PyModule_AddObject(m, "AS", (PyObject *)&ASType);
 
+       // Country
+       if (PyType_Ready(&CountryType) < 0)
+               return NULL;
+
+       Py_INCREF(&CountryType);
+       PyModule_AddObject(m, "Country", (PyObject *)&CountryType);
+
        // Database
        if (PyType_Ready(&DatabaseType) < 0)
                return NULL;