summaryrefslogtreecommitdiff
path: root/gmodule
diff options
context:
space:
mode:
authorHavoc Pennington <hp@pobox.com>2001-02-17 23:30:48 +0000
committerHavoc Pennington <hp@src.gnome.org>2001-02-17 23:30:48 +0000
commit1c391cc69846713b0406545146ea232efc5f34e2 (patch)
tree2941b3344e0111ac049df088fae03216ce473245 /gmodule
parentadfafc0872a0d787eb46b8a487fcd8db91ec34fb (diff)
include string.h
2001-02-17 Havoc Pennington <hp@pobox.com> * gthread.c: include string.h Applied patch from Soeren Sandmann: * testglib.c: const fixes * gwin32.h: format cleanups * gutils.c (g_atexit): constify a variable (g_find_program_in_path): constification (g_basename): G_CONST_RETURN (g_path_skip_root): G_CONST_RETURN (g_getenv): G_CONST_RETURN (g_get_user_name): G_CONST_RETURN (g_get_real_name): G_CONST_RETURN (g_get_home_dir): G_CONST_RETURN (g_get_tmp_dir): G_CONST_RETURN (g_get_prgname): G_CONST_RETURN (_glib_gettext): G_CONST_RETURN * gunicode.h: formatting cleanups * gstrfuncs.c (g_strerror): G_CONST_RETURN (g_strsignal): G_CONST_RETURN * gspawn.c (g_execute): const on variables * gmessages.c (printf_string_upper_bound): fix const on a variable * gmem.c (g_mem_chunk_new): make the "name" arg const (struct _GRealMemChunk): make the "name" field const * gfileutils.c (g_file_open_tmp): store const return in a const gchar* variable * gdataset.c (g_quark_to_string): G_CONST_RETURN 2001-02-17 Havoc Pennington <hp@pobox.com> Applied patch from Soeren Sandmann: * gvaluetypes.c (g_value_get_string): G_CONST_RETURN * gtype.c (g_type_name): G_CONST_RETURN * gsignal.c (g_signal_name): G_CONST_RETURN * gobject-query.c (main): const fix 2001-02-17 Havoc Pennington <hp@pobox.com> Applied patch from Soeren Sandmann: * gmodule.c (g_module_error): G_CONST_RETURN (g_module_name): G_CONST_RETURN
Diffstat (limited to 'gmodule')
-rw-r--r--gmodule/ChangeLog7
-rw-r--r--gmodule/gmodule.c6
-rw-r--r--gmodule/gmodule.h24
3 files changed, 22 insertions, 15 deletions
diff --git a/gmodule/ChangeLog b/gmodule/ChangeLog
index ff1e640fb..2e8192087 100644
--- a/gmodule/ChangeLog
+++ b/gmodule/ChangeLog
@@ -1,3 +1,10 @@
+2001-02-17 Havoc Pennington <hp@pobox.com>
+
+ Applied patch from Soeren Sandmann:
+
+ * gmodule.c (g_module_error): G_CONST_RETURN
+ (g_module_name): G_CONST_RETURN
+
Sat Feb 17 07:27:15 2001 Tim Janik <timj@gtk.org>
* gmodule.c: work around platforms that have broken RTLD_GLOBAL.
diff --git a/gmodule/gmodule.c b/gmodule/gmodule.c
index 25a6b3758..29848a369 100644
--- a/gmodule/gmodule.c
+++ b/gmodule/gmodule.c
@@ -477,7 +477,7 @@ g_module_make_resident (GModule *module)
module->is_resident = TRUE;
}
-gchar*
+G_CONST_RETURN gchar*
g_module_error (void)
{
return g_static_private_get (&module_error_private);
@@ -488,7 +488,7 @@ g_module_symbol (GModule *module,
const gchar *symbol_name,
gpointer *symbol)
{
- gchar *module_error;
+ const gchar *module_error;
if (symbol)
*symbol = NULL;
@@ -527,7 +527,7 @@ g_module_symbol (GModule *module,
return !module_error;
}
-gchar*
+G_CONST_RETURN gchar*
g_module_name (GModule *module)
{
g_return_val_if_fail (module != NULL, NULL);
diff --git a/gmodule/gmodule.h b/gmodule/gmodule.h
index 6bc75064a..18d0353ab 100644
--- a/gmodule/gmodule.h
+++ b/gmodule/gmodule.h
@@ -58,26 +58,25 @@ typedef void (*GModuleUnload) (GModule *module);
gboolean g_module_supported (void) G_GNUC_CONST;
/* open a module `file_name' and return handle, which is NULL on error */
-GModule* g_module_open (const gchar *file_name,
- GModuleFlags flags);
+GModule* g_module_open (const gchar *file_name,
+ GModuleFlags flags);
/* close a previously opened module, returns TRUE on success */
-gboolean g_module_close (GModule *module);
+gboolean g_module_close (GModule *module);
/* make a module resident so g_module_close on it will be ignored */
-void g_module_make_resident (GModule *module);
+void g_module_make_resident (GModule *module);
/* query the last module error as a string */
-gchar* g_module_error (void);
+G_CONST_RETURN gchar* g_module_error (void);
/* retrive a symbol pointer from `module', returns TRUE on success */
-gboolean g_module_symbol (GModule *module,
- const gchar *symbol_name,
- gpointer *symbol);
+gboolean g_module_symbol (GModule *module,
+ const gchar *symbol_name,
+ gpointer *symbol);
/* retrive the file name from an existing module */
-gchar* g_module_name (GModule *module);
-
+G_CONST_RETURN gchar* g_module_name (GModule *module);
/* Build the actual file name containing a module. `directory' is the
* directory where the module file is supposed to be, or NULL or empty
@@ -90,8 +89,9 @@ gchar* g_module_name (GModule *module);
*
* No checks are made that the file exists, or is of correct type.
*/
-gchar* g_module_build_path (const gchar *directory,
- const gchar *module_name);
+gchar* g_module_build_path (const gchar *directory,
+ const gchar *module_name);
+
#ifdef __cplusplus
}