summaryrefslogtreecommitdiff
path: root/libpeas
diff options
context:
space:
mode:
authorChristian Hergert <chergert@redhat.com>2019-08-05 19:19:08 -0700
committerChristian Hergert <chergert@redhat.com>2019-08-05 19:19:08 -0700
commiteed297fb82c3ae661b427ac5fe5ea6d299baa86a (patch)
treec05519606a62418d8783daece14b473d006b4eab /libpeas
parent7ad862c039ad5861ab270ac14ee59f664d7e1c32 (diff)
downloadlibpeas-eed297fb82c3ae661b427ac5fe5ea6d299baa86a.tar.gz
build: hide private symbols with -fvisibility=hidden
This continues with the previous commit to hide non-public symbols by default. It is slightly complicated by the fact that we need some symbol access from the unit tests. Normally that would mean we just add a static library and link against that, but we need shared access to globals so that is not an option. We could possibly switch to creating a shared library without -fvisibility=hidden.
Diffstat (limited to 'libpeas')
-rw-r--r--libpeas/meson.build2
-rw-r--r--libpeas/peas-engine-priv.h5
-rw-r--r--libpeas/peas-engine.c4
3 files changed, 7 insertions, 4 deletions
diff --git a/libpeas/meson.build b/libpeas/meson.build
index d48d535..75bd369 100644
--- a/libpeas/meson.build
+++ b/libpeas/meson.build
@@ -91,7 +91,7 @@ libpeas_sha = library(
version: lib_version,
include_directories: [rootdir, libpeas_srcdir],
dependencies: libpeas_deps,
- c_args: libpeas_c_args,
+ c_args: libpeas_c_args + hidden_visibility_args,
link_args: libpeas_link_args,
install: true,
install_dir: libdir,
diff --git a/libpeas/peas-engine-priv.h b/libpeas/peas-engine-priv.h
index c8fa9fd..c763a9c 100644
--- a/libpeas/peas-engine-priv.h
+++ b/libpeas/peas-engine-priv.h
@@ -22,9 +22,12 @@
#ifndef __PEAS_ENGINE_PRIV_H__
#define __PEAS_ENGINE_PRIV_H__
+#include "peas-version-macros.h"
+
G_BEGIN_DECLS
-void peas_engine_shutdown (void);
+PEAS_AVAILABLE_IN_ALL
+void _peas_engine_shutdown (void);
G_END_DECLS
diff --git a/libpeas/peas-engine.c b/libpeas/peas-engine.c
index 86706a0..de0b3c4 100644
--- a/libpeas/peas-engine.c
+++ b/libpeas/peas-engine.c
@@ -1635,7 +1635,7 @@ peas_engine_get_default (void)
}
/* < private >
- * peas_engine_shutdown:
+ * _peas_engine_shutdown:
*
* Frees memory shared by PeasEngines.
* No libpeas API should be called after calling this.
@@ -1643,7 +1643,7 @@ peas_engine_get_default (void)
* Note: this is private API and as such is not thread-safe.
*/
void
-peas_engine_shutdown (void)
+_peas_engine_shutdown (void)
{
gint i;