DEF_DLL_FN (void, g_type_init, (void));
# endif
DEF_DLL_FN (void, g_object_unref, (gpointer));
-DEF_DLL_FN (void, g_error_free, (GError *));
+DEF_DLL_FN (void, g_clear_error, (GError **));
static bool
init_svg_functions (void)
LOAD_DLL_FN (gobject, g_type_init);
# endif
LOAD_DLL_FN (gobject, g_object_unref);
- LOAD_DLL_FN (glib, g_error_free);
+ LOAD_DLL_FN (glib, g_clear_error);
return 1;
}
# undef gdk_pixbuf_get_pixels
# undef gdk_pixbuf_get_rowstride
# undef gdk_pixbuf_get_width
-# undef g_error_free
+# undef g_clear_error
# undef g_object_unref
# undef g_type_init
# undef rsvg_handle_close
# define gdk_pixbuf_get_pixels fn_gdk_pixbuf_get_pixels
# define gdk_pixbuf_get_rowstride fn_gdk_pixbuf_get_rowstride
# define gdk_pixbuf_get_width fn_gdk_pixbuf_get_width
-# define g_error_free fn_g_error_free
+# define g_clear_error fn_g_clear_error
# define g_object_unref fn_g_object_unref
# define g_type_init fn_g_type_init
# define rsvg_handle_close fn_rsvg_handle_close
/* FIXME: Use error->message so the user knows what is the actual
problem with the image. */
image_error ("Error parsing SVG image `%s'", img->spec);
- g_error_free (err);
+ g_clear_error (&err);
return 0;
}