gutils.h | gutils.h | |||
---|---|---|---|---|
skipping to change at line 111 | skipping to change at line 111 | |||
# define G_INLINE_FUNC | # define G_INLINE_FUNC | |||
# undef G_CAN_INLINE | # undef G_CAN_INLINE | |||
#elif defined (__GNUC__) | #elif defined (__GNUC__) | |||
# define G_INLINE_FUNC static __inline __attribute__ ((unused)) | # define G_INLINE_FUNC static __inline __attribute__ ((unused)) | |||
#elif defined (G_CAN_INLINE) | #elif defined (G_CAN_INLINE) | |||
# define G_INLINE_FUNC static inline | # define G_INLINE_FUNC static inline | |||
#else /* can't inline */ | #else /* can't inline */ | |||
# define G_INLINE_FUNC | # define G_INLINE_FUNC | |||
#endif /* !G_INLINE_FUNC */ | #endif /* !G_INLINE_FUNC */ | |||
/* Retrive static string info | #ifndef __GTK_DOC_IGNORE__ | |||
*/ | ||||
#ifdef G_OS_WIN32 | #ifdef G_OS_WIN32 | |||
#define g_get_user_name g_get_user_name_utf8 | #define g_get_user_name g_get_user_name_utf8 | |||
#define g_get_real_name g_get_real_name_utf8 | #define g_get_real_name g_get_real_name_utf8 | |||
#define g_get_home_dir g_get_home_dir_utf8 | #define g_get_home_dir g_get_home_dir_utf8 | |||
#define g_get_tmp_dir g_get_tmp_dir_utf8 | #define g_get_tmp_dir g_get_tmp_dir_utf8 | |||
#endif | #endif | |||
#endif | ||||
G_CONST_RETURN gchar* g_get_user_name (void); | G_CONST_RETURN gchar* g_get_user_name (void); | |||
G_CONST_RETURN gchar* g_get_real_name (void); | G_CONST_RETURN gchar* g_get_real_name (void); | |||
G_CONST_RETURN gchar* g_get_home_dir (void); | G_CONST_RETURN gchar* g_get_home_dir (void); | |||
G_CONST_RETURN gchar* g_get_tmp_dir (void); | G_CONST_RETURN gchar* g_get_tmp_dir (void); | |||
G_CONST_RETURN gchar* g_get_host_name (void); | G_CONST_RETURN gchar* g_get_host_name (void); | |||
gchar* g_get_prgname (void); | gchar* g_get_prgname (void); | |||
void g_set_prgname (const gchar *prgname); | void g_set_prgname (const gchar *prgname); | |||
G_CONST_RETURN gchar* g_get_application_name (void); | G_CONST_RETURN gchar* g_get_application_name (void); | |||
void g_set_application_name (const gchar *application_name ); | void g_set_application_name (const gchar *application_name ); | |||
skipping to change at line 156 | skipping to change at line 156 | |||
static inline G_CONST_RETURN gchar * G_CONST_RETURN * | static inline G_CONST_RETURN gchar * G_CONST_RETURN * | |||
_g_win32_get_system_data_dirs (void) | _g_win32_get_system_data_dirs (void) | |||
{ | { | |||
return g_win32_get_system_data_dirs_for_module ((void (*)(void)) &_g_win3 2_get_system_data_dirs); | return g_win32_get_system_data_dirs_for_module ((void (*)(void)) &_g_win3 2_get_system_data_dirs); | |||
} | } | |||
#define g_get_system_data_dirs _g_win32_get_system_data_dirs | #define g_get_system_data_dirs _g_win32_get_system_data_dirs | |||
#endif | #endif | |||
G_CONST_RETURN gchar* G_CONST_RETURN * g_get_system_config_dirs (void); | G_CONST_RETURN gchar* G_CONST_RETURN * g_get_system_config_dirs (void); | |||
const gchar * g_get_user_runtime_dir (void); | ||||
G_CONST_RETURN gchar* G_CONST_RETURN * g_get_language_names (void); | G_CONST_RETURN gchar* G_CONST_RETURN * g_get_language_names (void); | |||
gchar **g_get_locale_variants (const gchar *locale); | ||||
/** | /** | |||
* GUserDirectory: | * GUserDirectory: | |||
* @G_USER_DIRECTORY_DESKTOP: the user's Desktop directory | * @G_USER_DIRECTORY_DESKTOP: the user's Desktop directory | |||
* @G_USER_DIRECTORY_DOCUMENTS: the user's Documents directory | * @G_USER_DIRECTORY_DOCUMENTS: the user's Documents directory | |||
* @G_USER_DIRECTORY_DOWNLOAD: the user's Downloads directory | * @G_USER_DIRECTORY_DOWNLOAD: the user's Downloads directory | |||
* @G_USER_DIRECTORY_MUSIC: the user's Music directory | * @G_USER_DIRECTORY_MUSIC: the user's Music directory | |||
* @G_USER_DIRECTORY_PICTURES: the user's Pictures directory | * @G_USER_DIRECTORY_PICTURES: the user's Pictures directory | |||
* @G_USER_DIRECTORY_PUBLIC_SHARE: the user's shared directory | * @G_USER_DIRECTORY_PUBLIC_SHARE: the user's shared directory | |||
* @G_USER_DIRECTORY_TEMPLATES: the user's Templates directory | * @G_USER_DIRECTORY_TEMPLATES: the user's Templates directory | |||
* @G_USER_DIRECTORY_VIDEOS: the user's Movies directory | * @G_USER_DIRECTORY_VIDEOS: the user's Movies directory | |||
skipping to change at line 234 | skipping to change at line 238 | |||
/* These two functions are deprecated and will be removed in the next | /* These two functions are deprecated and will be removed in the next | |||
* major release of GLib. Use g_path_get_dirname/g_path_get_basename | * major release of GLib. Use g_path_get_dirname/g_path_get_basename | |||
* instead. Whatch out! The string returned by g_path_get_basename | * instead. Whatch out! The string returned by g_path_get_basename | |||
* must be g_freed, while the string returned by g_basename must not.*/ | * must be g_freed, while the string returned by g_basename must not.*/ | |||
G_CONST_RETURN gchar* g_basename (const gchar *file_name); | G_CONST_RETURN gchar* g_basename (const gchar *file_name); | |||
#define g_dirname g_path_get_dirname | #define g_dirname g_path_get_dirname | |||
#endif /* G_DISABLE_DEPRECATED */ | #endif /* G_DISABLE_DEPRECATED */ | |||
#ifndef __GTK_DOC_IGNORE__ | ||||
#ifdef G_OS_WIN32 | #ifdef G_OS_WIN32 | |||
#define g_get_current_dir g_get_current_dir_utf8 | #define g_get_current_dir g_get_current_dir_utf8 | |||
#endif | #endif | |||
#endif | ||||
/* The returned strings are newly allocated with g_malloc() */ | /* The returned strings are newly allocated with g_malloc() */ | |||
gchar* g_get_current_dir (void); | gchar* g_get_current_dir (void); | |||
gchar* g_path_get_basename (const gchar *file_name) G_GNUC_ MALLOC; | gchar* g_path_get_basename (const gchar *file_name) G_GNUC_ MALLOC; | |||
gchar* g_path_get_dirname (const gchar *file_name) G_GNUC_ MALLOC; | gchar* g_path_get_dirname (const gchar *file_name) G_GNUC_ MALLOC; | |||
/* Set the pointer at the specified location to NULL */ | /* Set the pointer at the specified location to NULL */ | |||
void g_nullify_pointer (gpointer *nullify_location); | void g_nullify_pointer (gpointer *nullify_location); | |||
/* return the environment string for the variable. The returned memory | /* return the environment string for the variable. The returned memory | |||
* must not be freed. */ | * must not be freed. */ | |||
#ifndef __GTK_DOC_IGNORE__ | ||||
#ifdef G_OS_WIN32 | #ifdef G_OS_WIN32 | |||
#define g_getenv g_getenv_utf8 | #define g_getenv g_getenv_utf8 | |||
#define g_setenv g_setenv_utf8 | #define g_setenv g_setenv_utf8 | |||
#define g_unsetenv g_unsetenv_utf8 | #define g_unsetenv g_unsetenv_utf8 | |||
#define g_find_program_in_path g_find_program_in_path_utf8 | #define g_find_program_in_path g_find_program_in_path_utf8 | |||
#endif | #endif | |||
#endif | ||||
G_CONST_RETURN gchar* g_getenv (const gchar *variable); | G_CONST_RETURN gchar* g_getenv (const gchar *variable); | |||
gboolean g_setenv (const gchar *variable, | gboolean g_setenv (const gchar *variable, | |||
const gchar *value, | const gchar *value, | |||
gboolean overwrite); | gboolean overwrite); | |||
void g_unsetenv (const gchar *variable); | void g_unsetenv (const gchar *variable); | |||
gchar** g_listenv (void); | gchar** g_listenv (void); | |||
gchar** g_get_environ (void); | ||||
/* private */ | /* private */ | |||
const gchar* _g_getenv_nomalloc (const gchar *variable, | const gchar* _g_getenv_nomalloc (const gchar *variable, | |||
gchar buffer[1024]); | gchar buffer[1024]); | |||
/* we try to provide a useful equivalent for ATEXIT if it is | /* we try to provide a useful equivalent for ATEXIT if it is | |||
* not defined, but use is actually abandoned. people should | * not defined, but use is actually abandoned. people should | |||
* use g_atexit() instead. | * use g_atexit() instead. | |||
*/ | */ | |||
typedef void (*GVoidFunc) (void); | typedef void (*GVoidFunc) (void); | |||
skipping to change at line 358 | skipping to change at line 367 | |||
if (mask & (1UL << nth_bit)) | if (mask & (1UL << nth_bit)) | |||
return nth_bit; | return nth_bit; | |||
} | } | |||
return -1; | return -1; | |||
} | } | |||
G_INLINE_FUNC guint | G_INLINE_FUNC guint | |||
g_bit_storage (gulong number) | g_bit_storage (gulong number) | |||
{ | { | |||
#if defined(__GNUC__) && (__GNUC__ >= 4) && defined(__OPTIMIZE__) | #if defined(__GNUC__) && (__GNUC__ >= 4) && defined(__OPTIMIZE__) | |||
return G_LIKELY (number) ? | return G_LIKELY (number) ? | |||
((GLIB_SIZEOF_LONG * 8 - 1) ^ __builtin_clzl(number)) + 1 : 1; | ((GLIB_SIZEOF_LONG * 8U - 1) ^ __builtin_clzl(number)) + 1 : 1; | |||
#else | #else | |||
register guint n_bits = 0; | register guint n_bits = 0; | |||
do | do | |||
{ | { | |||
n_bits++; | n_bits++; | |||
number >>= 1; | number >>= 1; | |||
} | } | |||
while (number); | while (number); | |||
return n_bits; | return n_bits; | |||
End of changes. 10 change blocks. | ||||
3 lines changed or deleted | 12 lines changed or added | |||
This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/ |