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.
This commit is contained in:
Tim Janik
1998-09-21 02:32:30 +00:00
committed by Tim Janik
parent b2268f6834
commit 2d68cbbb7d
20 changed files with 515 additions and 355 deletions

View File

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