summaryrefslogtreecommitdiff
path: root/gmodule
diff options
context:
space:
mode:
authorTim Janik <timj@gtk.org>1999-07-24 18:50:58 +0000
committerTim Janik <timj@src.gnome.org>1999-07-24 18:50:58 +0000
commit87c7aeb93bd654776f59805a342ad913031034f3 (patch)
tree4f43e0cefcbe83a51ffe9aeb24f3386f519a071d /gmodule
parentc8a28b935ca605ece11c65564ad1d3918786dd07 (diff)
downloadglib-87c7aeb93bd654776f59805a342ad913031034f3.tar.gz
18:36. incorporated proposed cleanups from gtk-devel-list.
Sat Jul 24 20:11:35 1999 Tim Janik <timj@gtk.org> * merged GLib 1.3.0 with glib-1.2.3 from Fri Jul 16 22:18:36. * incorporated proposed cleanups from gtk-devel-list. * bumped version number to GLib-1.3.1 * glib.h: * gqueue.c: * gstring.c: * glist.c: removed string tokenisation (we got g_strsplit() and g_strjoin() already) and readline functions. s/g_list_delete/g_list_delete_link. implemented g_slist_delete_link. removed notion of g_ATEXIT() macro in glib.h, this is an *internal* macro, g_atexit() is provided for public consumption. added GTrashStack inline utility functions. reimplement double eneded queues. removed GStack implementation, people can use a queue or a (singly) linked list for this task. deprecated g_strescape(), we need the SunOS variants here. * gdate.c: added DEBUG_MSG() macro to wrap old messages. * *.*: CVS merges. * upgrade to libtool 1.3.3.
Diffstat (limited to 'gmodule')
-rw-r--r--gmodule/ChangeLog9
-rw-r--r--gmodule/Makefile.am4
-rw-r--r--gmodule/gmodule.c18
3 files changed, 21 insertions, 10 deletions
diff --git a/gmodule/ChangeLog b/gmodule/ChangeLog
index 94b1fe9c9..7a4232668 100644
--- a/gmodule/ChangeLog
+++ b/gmodule/ChangeLog
@@ -1,3 +1,7 @@
+Sat Jul 24 20:47:18 1999 Tim Janik <timj@gtk.org>
+
+ * merged changes from GLib-1-2 branch.
+
1999-05-06 Tor Lillqvist <tml@iki.fi>
* gmodule.c: Remove LibMain.
@@ -16,6 +20,11 @@ Wed Apr 7 20:12:58 1999 ape@lrdpf.spacetec.no (Asbjorn Pettersen)
* gmodule.c (_g_module_open): Add gmodule-os2.c if G_MODULE_IMPL_OS2.
* gmoduleconf.h.in: Add G_MODULE_IMPL_OS2.
+Fri Apr 23 09:03:48 1999 Tim Janik <timj@gtk.org>
+
+ * gmodule.c (g_module_symbol): removed inline variable assignment.
+ s/CHECK_ERROR/SUPPORT_OR_RETURN/ to make the code more self descriptive.
+
Wed Feb 10 12:06:30 1999 Tim Janik <timj@gtk.org>
* gmodule.c (CHECK_ERROR): be more descriptive on unsupported systems.
diff --git a/gmodule/Makefile.am b/gmodule/Makefile.am
index 8f3f7b955..331a842a2 100644
--- a/gmodule/Makefile.am
+++ b/gmodule/Makefile.am
@@ -37,11 +37,11 @@ libgmodule_la_LIBADD = @G_MODULE_LIBS_EXTRA@ @G_MODULE_LIBS@ # $(libglib)
libgplugin_a_la_SOURCES = libgplugin_a.c
libgplugin_a_la_LDFLAGS = @G_MODULE_LDFLAGS@ -avoid-version -module
-libgplugin_a_la_LIBADD = @G_MODULE_LIBS_EXTRA@ @G_MODULE_LIBS@ @G_MODULE_PLUGIN_LIBS@ # $(libglib)
+libgplugin_a_la_LIBADD = @G_MODULE_LIBS@ @G_MODULE_LIBS_EXTRA@ @G_MODULE_PLUGIN_LIBS@ # $(libglib)
libgplugin_b_la_SOURCES = libgplugin_b.c
libgplugin_b_la_LDFLAGS = @G_MODULE_LDFLAGS@ -avoid-version -module
-libgplugin_b_la_LIBADD = @G_MODULE_LIBS_EXTRA@ @G_MODULE_LIBS@ @G_MODULE_PLUGIN_LIBS@ # $(libglib)
+libgplugin_b_la_LIBADD = @G_MODULE_LIBS@ @G_MODULE_LIBS_EXTRA@ @G_MODULE_PLUGIN_LIBS@ # $(libglib)
noinst_PROGRAMS = testgmodule
testgmodule_LDFLAGS += @G_MODULE_LDFLAGS@
diff --git a/gmodule/gmodule.c b/gmodule/gmodule.c
index e72d4cd11..d2a6f9942 100644
--- a/gmodule/gmodule.c
+++ b/gmodule/gmodule.c
@@ -127,7 +127,7 @@ g_module_set_error (const gchar *error)
/* --- include platform specifc code --- */
-#define CHECK_ERROR(rv) { g_module_set_error (NULL); }
+#define SUPPORT_OR_RETURN(rv) { g_module_set_error (NULL); }
#if (G_MODULE_IMPL == G_MODULE_IMPL_DL)
#include "gmodule-dl.c"
#elif (G_MODULE_IMPL == G_MODULE_IMPL_DLD)
@@ -139,8 +139,8 @@ g_module_set_error (const gchar *error)
#elif (G_MODULE_IMPL == G_MODULE_IMPL_BEOS)
#include "gmodule-beos.c"
#else
-#undef CHECK_ERROR
-#define CHECK_ERROR(rv) { g_module_set_error ("dynamic modules are " \
+#undef SUPPORT_OR_RETURN
+#define SUPPORT_OR_RETURN(rv) { g_module_set_error ("dynamic modules are " \
"not supported by this system"); return rv; }
static gpointer
_g_module_open (const gchar *file_name,
@@ -176,7 +176,7 @@ _g_module_build_path (const gchar *directory,
gboolean
g_module_supported (void)
{
- CHECK_ERROR (FALSE);
+ SUPPORT_OR_RETURN (FALSE);
return TRUE;
}
@@ -188,7 +188,7 @@ g_module_open (const gchar *file_name,
GModule *module;
gpointer handle;
- CHECK_ERROR (NULL);
+ SUPPORT_OR_RETURN (NULL);
if (!file_name)
{
@@ -284,7 +284,7 @@ g_module_open (const gchar *file_name,
gboolean
g_module_close (GModule *module)
{
- CHECK_ERROR (FALSE);
+ SUPPORT_OR_RETURN (FALSE);
g_return_val_if_fail (module != NULL, FALSE);
g_return_val_if_fail (module->ref_count > 0, FALSE);
@@ -354,9 +354,10 @@ g_module_symbol (GModule *module,
gpointer *symbol)
{
gchar *module_error;
+
if (symbol)
*symbol = NULL;
- CHECK_ERROR (FALSE);
+ SUPPORT_OR_RETURN (FALSE);
g_return_val_if_fail (module != NULL, FALSE);
g_return_val_if_fail (symbol_name != NULL, FALSE);
@@ -374,7 +375,8 @@ g_module_symbol (GModule *module,
*symbol = _g_module_symbol (module->handle, symbol_name);
#endif /* !G_MODULE_NEED_USCORE */
- if ((module_error = g_module_error()))
+ module_error = g_module_error();
+ if (module_error)
{
gchar *error;