This helps keeping the compiler happy while we refactor the global variables
into meshlink_handle_t one by one.
+// TODO: hack, remove once all global variables are gone.
+static void set_mesh(meshlink_handle_t *localmesh) {
+ mesh = localmesh;
+}
+
static meshlink_handle_t *meshlink_setup(meshlink_handle_t *mesh) {
static meshlink_handle_t *meshlink_setup(meshlink_handle_t *mesh) {
return meshlink_close(mesh), NULL;
}
return meshlink_close(mesh), NULL;
}
+// This is a *temporary* global variable which will keep the compiler happy
+// while refactoring the code to get rid of global variables.
+// TODO: remove this when no other global variables remain.
+
+extern meshlink_handle_t *mesh;
+
#endif // MESHLINK_INTERNAL_H
#endif // MESHLINK_INTERNAL_H