diff options
author | Tim Janik <timj@gtk.org> | 1998-09-21 02:32:30 +0000 |
---|---|---|
committer | Tim Janik <timj@src.gnome.org> | 1998-09-21 02:32:30 +0000 |
commit | 2d68cbbb7d37d3f265bf1087e6ddedcc58bc62be (patch) | |
tree | 8ddb4518aaaadef7827e377a76c3856506612d2b /gmodule | |
parent | b2268f6834e87139b503d2a5f01a3061bc9e2cc1 (diff) | |
download | glib-2d68cbbb7d37d3f265bf1087e6ddedcc58bc62be.tar.gz |
NEWS file update for upcoming release of GLib + GModule version 1.1.3,
Mon Sep 21 02:22:12 1998 Tim Janik <timj@gtk.org>
* NEWS file update for upcoming release of GLib + GModule
version 1.1.3, binary age 0, interface age 0. (GModule uses
the same version numbers as GLib.)
* glib.h: swap the inclusion of of float.h and limits.h to work
around a egcs 1.1 oddity on Solaris 2.5.1 (fix provided by
Per Abrahamsen <abraham@dina.kvl.dk>).
* glib.h:
* gscanner.c: renamed the GValue union to GTokenValue, this should
not affect source compatibility in most cases.
* ghash.c: added some g_return_if_fail() statements. make
g_hash_table_lookup_node() an inline function so we save an extra
function invokation on lookups.
Mon Sep 21 01:54:48 1998 Tim Janik <timj@gtk.org>
* gmodule.h:
* gmodule.c: renamed old _de_init functionality to _unload.
modules are now expected to export:
G_MODULE_EXPORT const gchar* g_module_check_init (GModule *module);
and
G_MODULE_EXPORT void g_module_unload (GModule *module);
returning a string other than NULL from g_module_check_init() will
prevent the module from being loaded. a call to g_module_make_resident()
from g_module_unload() will prevent the module from being unloaded and
still make it resident.
Diffstat (limited to 'gmodule')
-rw-r--r-- | gmodule/ChangeLog | 13 | ||||
-rw-r--r-- | gmodule/gmodule.c | 20 | ||||
-rw-r--r-- | gmodule/gmodule.h | 2 | ||||
-rw-r--r-- | gmodule/libgplugin_b.c | 4 |
4 files changed, 26 insertions, 13 deletions
diff --git a/gmodule/ChangeLog b/gmodule/ChangeLog index 723d5242d..07493b40b 100644 --- a/gmodule/ChangeLog +++ b/gmodule/ChangeLog @@ -1,3 +1,16 @@ +Mon Sep 21 01:54:48 1998 Tim Janik <timj@gtk.org> + + * gmodule.h: + * gmodule.c: renamed old _de_init functionality to _unload. + modules are now expected to export: + G_MODULE_EXPORT const gchar* g_module_check_init (GModule *module); + and + G_MODULE_EXPORT void g_module_unload (GModule *module); + returning a string other than NULL from g_module_check_init() will + prevent the module from being loaded. a call to g_module_make_resident() + from g_module_unload() will prevent the module from being unloaded and + still make it resident. + Thu Sep 17 06:34:22 1998 Tim Janik <timj@gtk.org> * gmodule.h: diff --git a/gmodule/gmodule.c b/gmodule/gmodule.c index 04d435e20..17133ffbe 100644 --- a/gmodule/gmodule.c +++ b/gmodule/gmodule.c @@ -38,7 +38,7 @@ struct _GModule gpointer handle; guint ref_count : 31; guint is_resident : 1; - GModuleDeInit de_init; + GModuleUnload unload; GModule *next; }; @@ -166,7 +166,7 @@ g_module_open (const gchar *file_name, main_module->handle = handle; main_module->ref_count = 1; main_module->is_resident = TRUE; - main_module->de_init = NULL; + main_module->unload = NULL; main_module->next = NULL; } } @@ -211,7 +211,7 @@ g_module_open (const gchar *file_name, module->handle = handle; module->ref_count = 1; module->is_resident = FALSE; - module->de_init = NULL; + module->unload = NULL; module->next = modules; modules = module; @@ -219,9 +219,9 @@ g_module_open (const gchar *file_name, if (g_module_symbol (module, "g_module_check_init", (gpointer) &check_init)) check_failed = check_init (module); - /* we don't call de_init() if the initialization check failed. */ + /* we don't call unload() if the initialization check failed. */ if (!check_failed) - g_module_symbol (module, "g_module_de_init", (gpointer) &module->de_init); + g_module_symbol (module, "g_module_unload", (gpointer) &module->unload); if (check_failed) { @@ -251,13 +251,13 @@ g_module_close (GModule *module) module->ref_count--; - if (!module->ref_count && !module->is_resident && module->de_init) + if (!module->ref_count && !module->is_resident && module->unload) { - GModuleDeInit de_init; + GModuleUnload unload; - de_init = module->de_init; - module->de_init = NULL; - de_init (module); + unload = module->unload; + module->unload = NULL; + unload (module); } if (!module->ref_count && !module->is_resident) diff --git a/gmodule/gmodule.h b/gmodule/gmodule.h index 966d5ef41..dbc794a7d 100644 --- a/gmodule/gmodule.h +++ b/gmodule/gmodule.h @@ -44,7 +44,7 @@ typedef enum typedef struct _GModule GModule; typedef const gchar* (*GModuleCheckInit) (GModule *module); -typedef void (*GModuleDeInit) (GModule *module); +typedef void (*GModuleUnload) (GModule *module); /* return TRUE if dynamic module loading is supported */ gboolean g_module_supported (void); diff --git a/gmodule/libgplugin_b.c b/gmodule/libgplugin_b.c index 2d2de9615..b6e752108 100644 --- a/gmodule/libgplugin_b.c +++ b/gmodule/libgplugin_b.c @@ -27,9 +27,9 @@ g_module_check_init (GModule *module) } G_MODULE_EXPORT void -g_module_de_init (GModule *module) +g_module_unload (GModule *module) { - g_print ("GPluginB: de-init\n"); + g_print ("GPluginB: unloaded\n"); } G_MODULE_EXPORT void |