mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-03 09:46:17 +01:00
glib-compile-schemas: write strinfo little endian
Ensure that the strinfo is output in little-endian byte order on big endian machines. GSettings is now passing all of its tests on PowerPC. Bug #630968 is closed.
This commit is contained in:
parent
61563d5f55
commit
8efcc0d8c8
@ -624,12 +624,18 @@ key_state_serialise (KeyState *state)
|
|||||||
if (state->strinfo->len)
|
if (state->strinfo->len)
|
||||||
{
|
{
|
||||||
GVariant *array;
|
GVariant *array;
|
||||||
|
guint32 *words;
|
||||||
gpointer data;
|
gpointer data;
|
||||||
gsize size;
|
gsize size;
|
||||||
|
gint i;
|
||||||
|
|
||||||
data = state->strinfo->str;
|
data = state->strinfo->str;
|
||||||
size = state->strinfo->len;
|
size = state->strinfo->len;
|
||||||
|
|
||||||
|
words = data;
|
||||||
|
for (i = 0; i < size / sizeof (guint32); i++)
|
||||||
|
words[i] = GUINT32_TO_LE (words[i]);
|
||||||
|
|
||||||
array = g_variant_new_from_data (G_VARIANT_TYPE ("au"),
|
array = g_variant_new_from_data (G_VARIANT_TYPE ("au"),
|
||||||
data, size, TRUE,
|
data, size, TRUE,
|
||||||
g_free, data);
|
g_free, data);
|
||||||
|
Loading…
Reference in New Issue
Block a user