[glib] Fix module-test in a better way



commit 7e00f381916cab6ba13f1d430310802cf6b9c726
Author: Matthias Clasen <mclasen redhat com>
Date:   Mon Jan 14 22:47:02 2013 -0500

    Fix module-test in a better way
    
    Avoid having visibility attribute directly in the code by
    adding a _GLIB_EXTERN-decorated declaration for the exported
    variables.

 tests/libmoduletestplugin_a.c |    3 ++-
 tests/libmoduletestplugin_b.c |    3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/tests/libmoduletestplugin_a.c b/tests/libmoduletestplugin_a.c
index 7301322..3ce43da 100644
--- a/tests/libmoduletestplugin_a.c
+++ b/tests/libmoduletestplugin_a.c
@@ -39,7 +39,8 @@ void g_clash_func (void);
 void gplugin_say_boo_func (void);
 void gplugin_a_module_func (GModule *module);
 
-__attribute__((visibility("default"))) gchar* gplugin_a_state;
+_GLIB_EXTERN gchar* gplugin_a_state;
+gchar* gplugin_a_state;
 
 _GLIB_EXTERN void
 gplugin_a_func (void)
diff --git a/tests/libmoduletestplugin_b.c b/tests/libmoduletestplugin_b.c
index 121259e..11e3ccf 100644
--- a/tests/libmoduletestplugin_b.c
+++ b/tests/libmoduletestplugin_b.c
@@ -31,7 +31,8 @@
 
 #include <gmodule.h>
 
-__attribute__((visibility("default"))) gchar* gplugin_b_state;
+_GLIB_EXTERN gchar* gplugin_b_state;
+gchar* gplugin_b_state;
 
 const gchar* g_module_check_init (GModule *module);
 void   g_module_unload (GModule *module);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]