From 51173f45fa62c9e288d36e5feaabf7cd8a046c0d Mon Sep 17 00:00:00 2001 From: Michael Tremer Date: Sat, 12 Jan 2019 16:20:35 +0000 Subject: [PATCH] python: Avoid declaring loc_ctx multiple times Signed-off-by: Michael Tremer --- src/python/locationmodule.c | 3 +++ src/python/locationmodule.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) 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 */ -- 2.39.2