[glib] glib-compile-schemas: write strinfo little endian
- From: Ryan Lortie <ryanl src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib] glib-compile-schemas: write strinfo little endian
- Date: Mon, 4 Oct 2010 03:28:15 +0000 (UTC)
commit 8efcc0d8c86b588eb0ee0e60d3c60d8c107734b5
Author: Ryan Lortie <desrt desrt ca>
Date: Sun Oct 3 23:26:18 2010 -0400
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.
gio/glib-compile-schemas.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/gio/glib-compile-schemas.c b/gio/glib-compile-schemas.c
index c2725b4..2c97261 100644
--- a/gio/glib-compile-schemas.c
+++ b/gio/glib-compile-schemas.c
@@ -624,12 +624,18 @@ key_state_serialise (KeyState *state)
if (state->strinfo->len)
{
GVariant *array;
+ guint32 *words;
gpointer data;
gsize size;
+ gint i;
data = state->strinfo->str;
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"),
data, size, TRUE,
g_free, data);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]