[glib] Fix up visibility fallout in module-test
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] Fix up visibility fallout in module-test
- Date: Tue, 15 Jan 2013 02:31:33 +0000 (UTC)
commit b96499690b0da7f2713e4d5d75b4e375ef01ed2b
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Jan 14 21:31:47 2013 -0500
Fix up visibility fallout in module-test
tests/libmoduletestplugin_a.c | 19 +++++++++++--------
tests/libmoduletestplugin_b.c | 18 ++++++++++--------
tests/module-test.c | 6 ++++--
3 files changed, 25 insertions(+), 18 deletions(-)
---
diff --git a/tests/libmoduletestplugin_a.c b/tests/libmoduletestplugin_a.c
index 69fdd0f..7301322 100644
--- a/tests/libmoduletestplugin_a.c
+++ b/tests/libmoduletestplugin_a.c
@@ -27,8 +27,11 @@
#undef G_DISABLE_ASSERT
#undef G_LOG_DOMAIN
-#include <gmodule.h>
-#include <stdlib.h>
+#include "config.h"
+
+#include <glib.h>
+#include <gmodule.h>
+#include <stdlib.h>
void gplugin_a_func (void);
void gplugin_clash_func (void);
@@ -36,33 +39,33 @@ void g_clash_func (void);
void gplugin_say_boo_func (void);
void gplugin_a_module_func (GModule *module);
-G_MODULE_EXPORT gchar* gplugin_a_state;
+__attribute__((visibility("default"))) gchar* gplugin_a_state;
-G_MODULE_EXPORT void
+_GLIB_EXTERN void
gplugin_a_func (void)
{
gplugin_a_state = "Hello world";
}
-G_MODULE_EXPORT void
+_GLIB_EXTERN void
gplugin_clash_func (void)
{
gplugin_a_state = "plugin clash";
}
-G_MODULE_EXPORT void
+_GLIB_EXTERN void
g_clash_func (void)
{
gplugin_a_state = "global clash";
}
-G_MODULE_EXPORT void
+_GLIB_EXTERN void
gplugin_say_boo_func (void)
{
gplugin_a_state = "BOOH";
}
-G_MODULE_EXPORT void
+_GLIB_EXTERN void
gplugin_a_module_func (GModule *module)
{
void *f = NULL;
diff --git a/tests/libmoduletestplugin_b.c b/tests/libmoduletestplugin_b.c
index 26cc33f..121259e 100644
--- a/tests/libmoduletestplugin_b.c
+++ b/tests/libmoduletestplugin_b.c
@@ -27,9 +27,11 @@
#undef G_DISABLE_ASSERT
#undef G_LOG_DOMAIN
-#include <gmodule.h>
+#include "config.h"
-G_MODULE_EXPORT gchar* gplugin_b_state;
+#include <gmodule.h>
+
+__attribute__((visibility("default"))) gchar* gplugin_b_state;
const gchar* g_module_check_init (GModule *module);
void g_module_unload (GModule *module);
@@ -39,7 +41,7 @@ void gplugin_clash_func (void);
void g_clash_func (void);
void gplugin_say_boo_func (void);
-G_MODULE_EXPORT const gchar*
+_GLIB_EXTERN const gchar*
g_module_check_init (GModule *module)
{
gplugin_b_state = "check-init";
@@ -47,31 +49,31 @@ g_module_check_init (GModule *module)
return NULL;
}
-G_MODULE_EXPORT void
+_GLIB_EXTERN void
g_module_unload (GModule *module)
{
gplugin_b_state = "unloaded";
}
-G_MODULE_EXPORT void
+_GLIB_EXTERN void
gplugin_b_func (void)
{
gplugin_b_state = "Hello world";
}
-G_MODULE_EXPORT void
+_GLIB_EXTERN void
gplugin_clash_func (void)
{
gplugin_b_state = "plugin clash";
}
-G_MODULE_EXPORT void
+_GLIB_EXTERN void
g_clash_func (void)
{
gplugin_b_state = "global clash";
}
-G_MODULE_EXPORT void
+_GLIB_EXTERN void
gplugin_say_boo_func (void)
{
gplugin_b_state = "BOOH";
diff --git a/tests/module-test.c b/tests/module-test.c
index dd99b71..4b195d3 100644
--- a/tests/module-test.c
+++ b/tests/module-test.c
@@ -27,14 +27,16 @@
#undef G_DISABLE_ASSERT
#undef G_LOG_DOMAIN
+#include "config.h"
+
#include <gmodule.h>
#include <string.h>
gchar* global_state;
-G_MODULE_EXPORT void g_clash_func (void);
+_GLIB_EXTERN void g_clash_func (void);
-G_MODULE_EXPORT void
+_GLIB_EXTERN void
g_clash_func (void)
{
global_state = "global clash";
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]