mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-07-30 13:53:30 +02:00
removed inline variable assignment. s/CHECK_ERROR/SUPPORT_OR_RETURN/ to
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.
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
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.
|
||||
|
@@ -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)
|
||||
@@ -135,8 +135,8 @@ g_module_set_error (const gchar *error)
|
||||
#elif (G_MODULE_IMPL == G_MODULE_IMPL_WIN32)
|
||||
#include "gmodule-win32.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,
|
||||
@@ -183,7 +183,7 @@ LibMain (void *hinstDll,
|
||||
gboolean
|
||||
g_module_supported (void)
|
||||
{
|
||||
CHECK_ERROR (FALSE);
|
||||
SUPPORT_OR_RETURN (FALSE);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@@ -195,7 +195,7 @@ g_module_open (const gchar *file_name,
|
||||
GModule *module;
|
||||
gpointer handle;
|
||||
|
||||
CHECK_ERROR (NULL);
|
||||
SUPPORT_OR_RETURN (NULL);
|
||||
|
||||
if (!file_name)
|
||||
{
|
||||
@@ -291,7 +291,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);
|
||||
@@ -361,9 +361,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);
|
||||
@@ -381,7 +382,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;
|
||||
|
||||
|
Reference in New Issue
Block a user