compose: Generate endian-dependent compact Compose data
authorSimon McVittie <smcv@debian.org>
Mon, 30 Aug 2021 09:13:33 +0000 (10:13 +0100)
committerMatthias Clasen <mclasen@redhat.com>
Thu, 2 Sep 2021 23:59:41 +0000 (19:59 -0400)
commit71f6ba92eee616816a8cfd0c49f84d6563dcf6e3
treedee38b4c1d55d950efc192d65a29271b89966aa0
parent11c1b97d5c0bc4a966cea266bde6dd3d95cc27ca
compose: Generate endian-dependent compact Compose data

The GtkComposeTable cache is always in big-endian format and is
byteswapped on load for the more common little-endian CPUs, but
init_builtin_table() in GtkIMContextSimple can't byteswap the built-in
data without copying it, which is undesirable. Pregenerate both big-
and little-endian compose data, and compile the correct flavour into
each build of GTK. This fixes failure of the composetable test when
building for a big-endian architecture such as s390x and (traditional,
big-endian) powerpc.

Resolves: https://gitlab.gnome.org/GNOME/gtk/-/issues/4217
Signed-off-by: Simon McVittie <smcv@debian.org>
gtk/compose/compose-parse.c
gtk/compose/sequences [deleted file]
gtk/compose/sequences-big-endian [new file with mode: 0644]
gtk/compose/sequences-little-endian [new file with mode: 0644]
gtk/gen-gtk-gresources-xml.py
gtk/meson.build