mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-03-01 05:32:11 +01:00
Fix up visibility fallout in module-test
This commit is contained in:
parent
d1c25d3191
commit
b96499690b
@ -27,6 +27,9 @@
|
||||
#undef G_DISABLE_ASSERT
|
||||
#undef G_LOG_DOMAIN
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <glib.h>
|
||||
#include <gmodule.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
@ -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;
|
||||
|
@ -27,9 +27,11 @@
|
||||
#undef G_DISABLE_ASSERT
|
||||
#undef G_LOG_DOMAIN
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include <gmodule.h>
|
||||
|
||||
G_MODULE_EXPORT gchar* gplugin_b_state;
|
||||
__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";
|
||||
|
@ -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";
|
||||
|
Loading…
x
Reference in New Issue
Block a user