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
This commit is contained in:
Havoc Pennington
2001-02-17 23:30:48 +00:00
committed by Havoc Pennington
parent adfafc0872
commit 1c391cc698
49 changed files with 766 additions and 423 deletions

View File

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

View File

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

View File

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