* g_path_get_basename() allocates new memory for the returned string, unlike
* this function which returns a pointer into the argument.
**/
-const gchar *
+G_CONST_RETURN gchar*
g_basename (const gchar *file_name)
{
register gchar *base;
*
* Returns: a pointer into @file_name after the root component.
*/
-const gchar *
+G_CONST_RETURN gchar*
g_path_skip_root (const gchar *file_name)
{
g_return_val_if_fail (file_name != NULL, NULL);
* overwritten by the next call to g_getenv(), g_setenv() or
* g_unsetenv().
**/
-const gchar *
+G_CONST_RETURN gchar*
g_getenv (const gchar *variable)
{
#ifndef G_OS_WIN32
*
* Returns: the user name of the current user.
*/
-const gchar *
+G_CONST_RETURN gchar*
g_get_user_name (void)
{
g_get_any_init_locked ();
*
* Returns: the user's real name.
*/
-const gchar *
+G_CONST_RETURN gchar*
g_get_real_name (void)
{
g_get_any_init_locked ();
*
* Returns: the current user's home directory
*/
-const gchar *
+G_CONST_RETURN gchar*
g_get_home_dir (void)
{
g_get_any_init_locked ();
*
* Returns: the directory to use for temporary files.
*/
-const gchar *
+G_CONST_RETURN gchar*
g_get_tmp_dir (void)
{
g_get_any_init_locked ();
*
* Since: 2.2
**/
-const gchar *
+G_CONST_RETURN gchar*
g_get_application_name (void)
{
gchar* retval;
* or freed.
* Since: 2.6
**/
-const gchar *
+G_CONST_RETURN gchar*
g_get_user_data_dir (void)
{
gchar *data_dir;
* or freed.
* Since: 2.6
**/
-const gchar *
+G_CONST_RETURN gchar*
g_get_user_config_dir (void)
{
G_LOCK (g_utils_global);
* or freed.
* Since: 2.6
**/
-const gchar *
+G_CONST_RETURN gchar*
g_get_user_cache_dir (void)
{
gchar *cache_dir;
*
* Since: 2.14
*/
-const gchar *
+G_CONST_RETURN gchar *
g_get_user_special_dir (GUserDirectory directory)
{
g_return_val_if_fail (directory >= G_USER_DIRECTORY_DESKTOP &&
return retval;
}
-const gchar * const *
+G_CONST_RETURN gchar * G_CONST_RETURN *
g_win32_get_system_data_dirs_for_module (void (*address_of_function)())
{
GArray *data_dirs;
if (retval != NULL)
{
G_UNLOCK (g_utils_global);
- return (const gchar * const *) retval;
+ return (G_CONST_RETURN gchar * G_CONST_RETURN *) retval;
}
}
}
G_UNLOCK (g_utils_global);
}
- return (const gchar * const *) retval;
+ return (G_CONST_RETURN gchar * G_CONST_RETURN *) retval;
}
#endif
* not be modified or freed.
* Since: 2.6
**/
-const gchar * const *
+G_CONST_RETURN gchar * G_CONST_RETURN *
g_get_system_data_dirs (void)
{
gchar **data_dir_vector;
G_UNLOCK (g_utils_global);
- return (const gchar * const *) data_dir_vector;
+ return (G_CONST_RETURN gchar * G_CONST_RETURN *) data_dir_vector;
}
/**
* not be modified or freed.
* Since: 2.6
**/
-const gchar * const *
+G_CONST_RETURN gchar * G_CONST_RETURN *
g_get_system_config_dirs (void)
{
gchar *conf_dirs, **conf_dir_vector;
conf_dir_vector = g_system_config_dirs;
G_UNLOCK (g_utils_global);
- return (const gchar * const *) conf_dir_vector;
+ return (G_CONST_RETURN gchar * G_CONST_RETURN *) conf_dir_vector;
}
#ifndef G_OS_WIN32
*
* Since: 2.6
**/
-const gchar * const *
+G_CONST_RETURN gchar * G_CONST_RETURN *
g_get_language_names (void)
{
static GStaticPrivate cache_private = G_STATIC_PRIVATE_INIT;
cache->language_names = (gchar **) g_ptr_array_free (array, FALSE);
}
- return (const gchar * const *) cache->language_names;
+ return (G_CONST_RETURN gchar * G_CONST_RETURN *) cache->language_names;
}
/**
*
* Returns: the transation of @str to the current locale
*/
-const gchar *
+G_CONST_RETURN gchar *
glib_gettext (const gchar *str)
{
ensure_gettext_initialized();
*
* Returns: the transation of @str to the current locale
*/
-const gchar *
+G_CONST_RETURN gchar *
glib_pgettext(const gchar *msgctxtid,
gsize msgidoffset)
{
#undef g_getenv
-const gchar *
+G_CONST_RETURN gchar*
g_getenv (const gchar *variable)
{
gchar *utf8_variable = g_locale_to_utf8 (variable, -1, NULL, NULL, NULL);
#undef g_get_user_name
-const gchar *
+G_CONST_RETURN gchar*
g_get_user_name (void)
{
g_get_any_init_locked ();
#undef g_get_real_name
-const gchar *
+G_CONST_RETURN gchar*
g_get_real_name (void)
{
g_get_any_init_locked ();
#undef g_get_home_dir
-const gchar *
+G_CONST_RETURN gchar*
g_get_home_dir (void)
{
g_get_any_init_locked ();
#undef g_get_tmp_dir
-const gchar *
+G_CONST_RETURN gchar*
g_get_tmp_dir (void)
{
g_get_any_init_locked ();