After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 773760 - windows: Remove old codepage ABI compat code
windows: Remove old codepage ABI compat code
Status: RESOLVED FIXED
Product: gdk-pixbuf
Classification: Platform
Component: general
git master
Other Windows
: Normal normal
: ---
Assigned To: gdk-pixbuf-maint
gdk-pixbuf-maint
Depends on:
Blocks:
 
 
Reported: 2016-10-31 21:15 UTC by Christoph Reiter (lazka)
Modified: 2016-11-07 11:12 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Remove old codepage ABI compat code (14.88 KB, patch)
2016-10-31 21:15 UTC, Christoph Reiter (lazka)
committed Details | Review

Description Christoph Reiter (lazka) 2016-10-31 21:15:14 UTC
Created attachment 338853 [details] [review]
Remove old codepage ABI compat code

(and as a side effect make the gi bindings API compatible with
other platforms)

The compat code was added in
https://git.gnome.org/browse/gdk-pixbuf/commit/?id=141506eb46927eb10b74bc24727488bdbde1c7d4
to allow switching to utf-8 paths while keeping binary compatibility and to
make new programs link against the "_utf8" variants.

This results in two problems for gi bindings:
(1) g-ir-scanner can't find the annotations due to the renames and thus
    gdk_pixbuf_savev() can't be used in bindings (the other functions happen to
    work with default annotations)
(2) g-ir-scanner will write the renamed functions in the gir/typelib with
    the "_utf8" suffix, making the resulting bindings API incompatible with other
    platforms.

Some months ago
https://git.gnome.org/browse/gdk-pixbuf/commit/?id=6855a2d806b2305938abc04b0cb4fa383f8ccd3b
got rid of symbol files, breaking ABI and old binaries.

This patch removes the, now unused, codepage code and removes the renames so that
new code links against the real functions again. To not break recent binaries
add new functions with the _utf8 suffix which just call the main functions.
Annotations are copied as well to not break bindings API.

A similar change in glib was commited some years ago
https://git.gnome.org/browse/glib/commit/?id=8c42a663f8182f8281c083390aa761e8e9badc63
Comment 1 Christoph Reiter (lazka) 2016-11-05 08:43:40 UTC
This patch is now included in msys2: https://github.com/Alexpux/MINGW-packages/pull/1883
Comment 2 Fan, Chun-wei 2016-11-07 08:20:26 UTC
Review of attachment 338853 [details] [review]:

Hi Christoph,

I think the patch looks fine to me, and didn't break ABI against the already-built GTK+.  I think I will let Nacho and/or LRN look at this as well just to be really sure.

With blessings, and cheers!
Comment 3 LRN 2016-11-07 11:02:54 UTC
Okay, go for it.
Comment 4 Christoph Reiter (lazka) 2016-11-07 11:12:02 UTC
Thanks! Pushed: https://git.gnome.org/browse/gdk-pixbuf/commit/?id=85b4f6c291c5b928b4b60a31dfac83ec2927f345