summaryrefslogtreecommitdiff
path: root/libgweather/gweather-version.h.in
diff options
context:
space:
mode:
authorEmmanuele Bassi <ebassi@gnome.org>2021-10-11 15:18:49 +0100
committerEmmanuele Bassi <ebassi@gnome.org>2021-10-13 13:01:56 +0100
commit8da63f16839edf12fa87af11a0730be7daf01f84 (patch)
tree9ddc6066906485c0ca3ee200cbd65f487b3789cf /libgweather/gweather-version.h.in
parent7aca088bdeb7b3082b0a3f0df612ca025614870e (diff)
downloadlibgweather-8da63f16839edf12fa87af11a0730be7daf01f84.tar.gz
Use explicit symbol annotation and visibility
All symbols should be hidden by default, and public symbols should be explicitly annotated. Once we commit to a stable API/ABI, we will be able to use versioned macros to mark symbols for deprecation, and get compiler warnings that can be toggled on and off by consumers of our API. The current symbol visibility map includes two private symbols used by our tests; to avoid this leakage, we can build libgweather as a static library, and then use the static library for our tests and as the base of our public shared library.
Diffstat (limited to 'libgweather/gweather-version.h.in')
-rw-r--r--libgweather/gweather-version.h.in7
1 files changed, 7 insertions, 0 deletions
diff --git a/libgweather/gweather-version.h.in b/libgweather/gweather-version.h.in
index ffa73d5..7e5edd7 100644
--- a/libgweather/gweather-version.h.in
+++ b/libgweather/gweather-version.h.in
@@ -14,6 +14,13 @@
#error "gweather-version.h must not be included individually, include gweather.h instead"
#endif
+#ifndef _GWEATHER_EXTERN
+#define _GWEATHER_EXTERN extern
+#endif
+
+/* Backstop for all symbols available before the introduction of versioned macros */
+#define GWEATHER_AVAILABLE_IN_ALL _GWEATHER_EXTERN
+
/**
* SECTION:gweatherversion
* @short_description: libgweather version checking