python: Avoid declaring loc_ctx multiple times master
authorMichael Tremer <michael.tremer@ipfire.org>
Sat, 12 Jan 2019 16:20:35 +0000 (16:20 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Sat, 12 Jan 2019 16:25:13 +0000 (16:25 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/python/locationmodule.c
src/python/locationmodule.h

index dcb5a47..a1e4d82 100644 (file)
@@ -23,6 +23,9 @@
 #include "network.h"
 #include "writer.h"
 
+/* Declare global context */
+struct loc_ctx* loc_ctx;
+
 PyMODINIT_FUNC PyInit_location(void);
 
 static void location_free(void) {
index 2847366..2f4d652 100644 (file)
@@ -20,6 +20,6 @@
 #include <loc/libloc.h>
 #include <loc/as.h>
 
-struct loc_ctx* loc_ctx;
+extern struct loc_ctx* loc_ctx;
 
 #endif /* PYTHON_LOCATION_MODULE_H */