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.
This commit is contained in:
Matthias Clasen 2013-01-14 22:47:02 -05:00
parent d4f0ae2c69
commit 7e00f38191
2 changed files with 4 additions and 2 deletions

View File

@ -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)

View File

@ -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);