From: Michael Tremer Date: Sat, 12 Jan 2019 16:20:35 +0000 (+0000) Subject: python: Avoid declaring loc_ctx multiple times X-Git-Tag: 0.9.0~64 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=51173f45fa62c9e288d36e5feaabf7cd8a046c0d;p=location%2Flibloc.git python: Avoid declaring loc_ctx multiple times Signed-off-by: Michael Tremer --- diff --git a/src/python/locationmodule.c b/src/python/locationmodule.c index dcb5a47..a1e4d82 100644 --- a/src/python/locationmodule.c +++ b/src/python/locationmodule.c @@ -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) { diff --git a/src/python/locationmodule.h b/src/python/locationmodule.h index 2847366..2f4d652 100644 --- a/src/python/locationmodule.h +++ b/src/python/locationmodule.h @@ -20,6 +20,6 @@ #include #include -struct loc_ctx* loc_ctx; +extern struct loc_ctx* loc_ctx; #endif /* PYTHON_LOCATION_MODULE_H */