diff --git a/ChangeLog b/ChangeLog index f7de82d720..0cd74f28ef 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2006-07-05 Sven Neumann + + * libgimpbase/gimpenv.h + * libgimpbase/gimpmemsize.h + * libgimpbase/gimpparasiteio.[ch] + * libgimpbase/gimputils.h + * libgimpconfig/gimpconfig-path.[ch] + * libgimpthumb/gimpthumb-utils.[ch]: marked some function with + G_GNUC_MALLOC. + + * plug-ins/common/dicom.c: use g_date_set_time_t() instead of the + deprecated g_date_set_time(). + 2006-07-05 Michael Natterer * configure.in: depend on glib >= 2.10.2, gtk+ >= 2.8.18 diff --git a/libgimpbase/gimpenv.h b/libgimpbase/gimpenv.h index 73eb5dcf6c..2fee7aa4f6 100644 --- a/libgimpbase/gimpenv.h +++ b/libgimpbase/gimpenv.h @@ -35,16 +35,16 @@ const gchar * gimp_locale_directory (void) G_GNUC_CONST; const gchar * gimp_sysconf_directory (void) G_GNUC_CONST; const gchar * gimp_plug_in_directory (void) G_GNUC_CONST; const gchar * gimp_gtkrc (void) G_GNUC_CONST; -gchar * gimp_personal_rc_file (const gchar *basename); +gchar * gimp_personal_rc_file (const gchar *basename) G_GNUC_MALLOC; GList * gimp_path_parse (const gchar *path, gint max_paths, gboolean check, GList **check_failed); -gchar * gimp_path_to_str (GList *path); +gchar * gimp_path_to_str (GList *path) G_GNUC_MALLOC; void gimp_path_free (GList *path); -gchar * gimp_path_get_user_writable_dir (GList *path); +gchar * gimp_path_get_user_writable_dir (GList *path) G_GNUC_MALLOC; /* should be considered private, don't use! */ diff --git a/libgimpbase/gimpmemsize.h b/libgimpbase/gimpmemsize.h index a6f9cccc4d..c1ff36747c 100644 --- a/libgimpbase/gimpmemsize.h +++ b/libgimpbase/gimpmemsize.h @@ -32,11 +32,11 @@ G_BEGIN_DECLS GType gimp_memsize_get_type (void) G_GNUC_CONST; -gchar * gimp_memsize_serialize (guint64 memsize); +gchar * gimp_memsize_serialize (guint64 memsize) G_GNUC_MALLOC; gboolean gimp_memsize_deserialize (const gchar *string, guint64 *memsize); -gchar * gimp_memsize_to_string (guint64 memsize); +gchar * gimp_memsize_to_string (guint64 memsize) G_GNUC_MALLOC; /* diff --git a/libgimpbase/gimpparasiteio.c b/libgimpbase/gimpparasiteio.c index d5dce2431e..84bf6ae6c6 100644 --- a/libgimpbase/gimpparasiteio.c +++ b/libgimpbase/gimpparasiteio.c @@ -160,15 +160,14 @@ gimp_pixpipe_params_parse (const gchar *string, gchar * gimp_pixpipe_params_build (GimpPixPipeParams *params) { - GString *s; - gchar *str; + GString *str; gint i; g_return_val_if_fail (params != NULL, NULL); - s = g_string_new (NULL); + str = g_string_new (NULL); - g_string_printf (s, "ncells:%d cellwidth:%d cellheight:%d " + g_string_printf (str, "ncells:%d cellwidth:%d cellheight:%d " "step:%d dim:%d cols:%d rows:%d placement:%s", params->ncells, params->cellwidth, params->cellheight, params->step, params->dim, @@ -177,12 +176,9 @@ gimp_pixpipe_params_build (GimpPixPipeParams *params) for (i = 0; i < params->dim; i++) { - g_string_append_printf (s, " rank%d:%d", i, params->rank[i]); - g_string_append_printf (s, " sel%d:%s", i, params->selection[i]); + g_string_append_printf (str, " rank%d:%d", i, params->rank[i]); + g_string_append_printf (str, " sel%d:%s", i, params->selection[i]); } - str = s->str; - g_string_free (s, FALSE); - - return str; + return g_string_free (str, FALSE); } diff --git a/libgimpbase/gimpparasiteio.h b/libgimpbase/gimpparasiteio.h index 88036bece2..7164112c20 100644 --- a/libgimpbase/gimpparasiteio.h +++ b/libgimpbase/gimpparasiteio.h @@ -63,7 +63,7 @@ void gimp_pixpipe_params_parse (const gchar *parameters, GimpPixPipeParams *params); /* Build a string representation of GimpPixPipeParams */ -gchar * gimp_pixpipe_params_build (GimpPixPipeParams *params); +gchar * gimp_pixpipe_params_build (GimpPixPipeParams *params) G_GNUC_MALLOC; G_END_DECLS diff --git a/libgimpbase/gimputils.h b/libgimpbase/gimputils.h index dcb9f501d0..53819c909b 100644 --- a/libgimpbase/gimputils.h +++ b/libgimpbase/gimputils.h @@ -24,17 +24,17 @@ G_BEGIN_DECLS gchar * gimp_utf8_strtrim (const gchar *str, - gint max_chars); + gint max_chars) G_GNUC_MALLOC; gchar * gimp_any_to_utf8 (const gchar *str, gssize len, const gchar *warning_format, - ...) G_GNUC_PRINTF (3, 4); + ...) G_GNUC_PRINTF (3, 4) G_GNUC_MALLOC; const gchar * gimp_filename_to_utf8 (const gchar *filename); -gchar * gimp_strip_uline (const gchar *str); -gchar * gimp_escape_uline (const gchar *str); +gchar * gimp_strip_uline (const gchar *str) G_GNUC_MALLOC; +gchar * gimp_escape_uline (const gchar *str) G_GNUC_MALLOC; -gchar * gimp_canonicalize_identifier (const gchar *identifier); +gchar * gimp_canonicalize_identifier (const gchar *identifier) G_GNUC_MALLOC; GimpEnumDesc * gimp_enum_get_desc (GEnumClass *enum_class, gint value); diff --git a/libgimpconfig/gimpconfig-path.c b/libgimpconfig/gimpconfig-path.c index 1e1e613df0..53a6082639 100644 --- a/libgimpconfig/gimpconfig-path.c +++ b/libgimpconfig/gimpconfig-path.c @@ -178,7 +178,7 @@ gimp_param_spec_config_path_type (GParamSpec *pspec) */ static gchar * gimp_config_path_expand_only (const gchar *path, - GError **error); + GError **error) G_GNUC_MALLOC; static inline gchar * gimp_config_path_extract_token (const gchar **str); diff --git a/libgimpconfig/gimpconfig-path.h b/libgimpconfig/gimpconfig-path.h index 441d32e64a..2e8f78480e 100644 --- a/libgimpconfig/gimpconfig-path.h +++ b/libgimpconfig/gimpconfig-path.h @@ -74,11 +74,11 @@ GimpConfigPathType gimp_param_spec_config_path_type (GParamSpec *pspec); gchar * gimp_config_path_expand (const gchar *path, gboolean recode, - GError **error); + GError **error) G_GNUC_MALLOC; -gchar * gimp_config_build_data_path (const gchar *name); -gchar * gimp_config_build_writable_path (const gchar *name); -gchar * gimp_config_build_plug_in_path (const gchar *name); +gchar * gimp_config_build_data_path (const gchar *name) G_GNUC_MALLOC; +gchar * gimp_config_build_writable_path (const gchar *name) G_GNUC_MALLOC; +gchar * gimp_config_build_plug_in_path (const gchar *name) G_GNUC_MALLOC; G_END_DECLS diff --git a/libgimpthumb/gimpthumb-utils.c b/libgimpthumb/gimpthumb-utils.c index 1ade38bc4e..fb564776f1 100644 --- a/libgimpthumb/gimpthumb-utils.c +++ b/libgimpthumb/gimpthumb-utils.c @@ -52,7 +52,7 @@ static gint gimp_thumb_size (GimpThumbSize size); static gchar * gimp_thumb_png_lookup (const gchar *name, const gchar *basedir, - GimpThumbSize *size); + GimpThumbSize *size) G_GNUC_MALLOC; static const gchar * gimp_thumb_png_name (const gchar *uri); static void gimp_thumb_exit (void); diff --git a/libgimpthumb/gimpthumb-utils.h b/libgimpthumb/gimpthumb-utils.h index b4d385d1b8..ea1a161cdd 100644 --- a/libgimpthumb/gimpthumb-utils.h +++ b/libgimpthumb/gimpthumb-utils.h @@ -33,7 +33,7 @@ gboolean gimp_thumb_init (const gchar *creator, const gchar *thumb_basedir); gchar * gimp_thumb_find_thumb (const gchar *uri, - GimpThumbSize *size); + GimpThumbSize *size) G_GNUC_MALLOC; GimpThumbFileType gimp_thumb_file_test (const gchar *filename, gint64 *mtime, @@ -41,16 +41,16 @@ GimpThumbFileType gimp_thumb_file_test (const gchar *filename, gint *err_no); gchar * gimp_thumb_name_from_uri (const gchar *uri, - GimpThumbSize size); + GimpThumbSize size) G_GNUC_MALLOC; const gchar * gimp_thumb_get_thumb_dir (GimpThumbSize size); gboolean gimp_thumb_ensure_thumb_dir (GimpThumbSize size, GError **error); void gimp_thumbs_delete_for_uri (const gchar *uri); gchar * gimp_thumb_name_from_uri_local (const gchar *uri, - GimpThumbSize size); + GimpThumbSize size) G_GNUC_MALLOC; gchar * gimp_thumb_get_thumb_dir_local (const gchar *dirname, - GimpThumbSize size); + GimpThumbSize size) G_GNUC_MALLOC; gboolean gimp_thumb_ensure_thumb_dir_local (const gchar *dirname, GimpThumbSize size, GError **error); diff --git a/plug-ins/common/dicom.c b/plug-ins/common/dicom.c index cfd8723d4a..38744bcac6 100644 --- a/plug-ins/common/dicom.c +++ b/plug-ins/common/dicom.c @@ -677,7 +677,7 @@ save_image (const gchar *filename, } date = g_date_new (); - g_date_set_time (date, time (NULL)); + g_date_set_time_t (date, time (NULL)); g_snprintf (today_string, sizeof (today_string), "%04d%02d%02d", date->year, date->month, date->day); g_date_free (date);