Subject: Re: bug#74606: 31.0.50; Another rsvg API change

From: Eli Zaretskii <[email-masked]>
Date: Sat, 30 Nov 2024 13:06:39 +0200

> Date: Fri, 29 Nov 2024 17:42:19 +0100
> From:  Manuel Giraud via "Bug reports for GNU Emacs,
>  the Swiss army knife of text editors" <[email-masked]>
> 
> This is not a bug (yet) per se but here is a new warning I get from
> compiling Emacs with librsvg version 2.59.2:
> 
>   CC       image.o
> image.c: In function 'svg_load_image':
> image.c:12360:3: warning: 'rsvg_handle_get_pixbuf' is deprecated: Use 'rsvg_handle_get_pixbuf_and_error' instead [-Wdeprecated-declarations]
> 12360 |   pixbuf = rsvg_handle_get_pixbuf (rsvg_handle);
>       |   ^~~~~~
> In file included from /usr/local/include/librsvg-2.0/librsvg/rsvg.h:1332,
>                  from image.c:11652:
> /usr/local/include/librsvg-2.0/librsvg/rsvg-pixbuf.h:55:12: note: declared here
>    55 | GdkPixbuf *rsvg_handle_get_pixbuf (RsvgHandle *handle);
>       |            ^~~~~~~~~~~~~~~~~~~~~~

The way to fix this is to add code conditioned on librsvg version that
uses rsvg_handle_get_pixbuf_and_error when available.

Thanks.