configure.ac, *: require GLib 2.40.0

Remove gimp_output_stream_[v]printf() and use the new functions from
GLib instead. Use memmove() instead of the deprecated g_memmove().
This commit is contained in:
Michael Natterer 2014-08-12 15:29:34 +02:00
parent 0904b1e923
commit dae366bb6e
10 changed files with 37 additions and 98 deletions

View file

@ -83,8 +83,6 @@ EXPORTS
gimp_minor_version
gimp_offset_type_get_type
gimp_orientation_type_get_type
gimp_output_stream_printf
gimp_output_stream_vprintf
gimp_paint_application_mode_get_type
gimp_param_memsize_get_type
gimp_param_parasite_get_type

View file

@ -810,47 +810,3 @@ gimp_flags_value_get_help (GFlagsClass *flags_class,
return NULL;
}
gboolean
gimp_output_stream_printf (GOutputStream *stream,
gsize *bytes_written,
GCancellable *cancellable,
GError **error,
const gchar *format,
...)
{
va_list args;
gboolean success;
va_start (args, format);
success = gimp_output_stream_vprintf (stream, bytes_written, cancellable,
error, format, args);
va_end (args);
return success;
}
gboolean
gimp_output_stream_vprintf (GOutputStream *stream,
gsize *bytes_written,
GCancellable *cancellable,
GError **error,
const gchar *format,
va_list args)
{
gchar *text;
gboolean success;
g_return_val_if_fail (G_IS_OUTPUT_STREAM (stream), FALSE);
g_return_val_if_fail (cancellable == NULL || G_IS_CANCELLABLE (stream), FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
g_return_val_if_fail (format != NULL, FALSE);
text = g_strdup_vprintf (format, args);
success = g_output_stream_write_all (stream,
text, strlen (text),
bytes_written, cancellable, error);
g_free (text);
return success;
}

View file

@ -69,21 +69,6 @@ const gchar * gimp_flags_value_get_desc (GFlagsClass *flags_class,
const gchar * gimp_flags_value_get_help (GFlagsClass *flags_class,
GFlagsValue *flags_value);
/* temporary, to be removed when we depend on glib 2.40, which will
* clearly be before gimp 2.10
*/
gboolean gimp_output_stream_printf (GOutputStream *stream,
gsize *bytes_written,
GCancellable *cancellable,
GError **error,
const gchar *format,
...) G_GNUC_PRINTF (5, 6);
gboolean gimp_output_stream_vprintf (GOutputStream *stream,
gsize *bytes_written,
GCancellable *cancellable,
GError **error,
const gchar *format,
va_list args) G_GNUC_PRINTF (5, 0);
G_END_DECLS

View file

@ -277,8 +277,8 @@ gimp_value_array_insert (GimpValueArray *value_array,
value_array_grow (value_array, value_array->n_values + 1, FALSE);
if (index + 1 < value_array->n_values)
g_memmove (value_array->values + index + 1, value_array->values + index,
(i - index) * sizeof (value_array->values[0]));
memmove (value_array->values + index + 1, value_array->values + index,
(i - index) * sizeof (value_array->values[0]));
memset (value_array->values + index, 0, sizeof (value_array->values[0]));
@ -317,8 +317,8 @@ gimp_value_array_remove (GimpValueArray *value_array,
value_array->n_values--;
if (index < value_array->n_values)
g_memmove (value_array->values + index, value_array->values + index + 1,
(value_array->n_values - index) * sizeof (value_array->values[0]));
memmove (value_array->values + index, value_array->values + index + 1,
(value_array->n_values - index) * sizeof (value_array->values[0]));
value_array_shrink (value_array);