projects
/
platform
/
upstream
/
glib.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
02f143c
)
tests/gvariant: Fix test on big endian architectures
author
Colin Walters
<walters@verbum.org>
Wed, 5 Sep 2012 13:04:58 +0000
(09:04 -0400)
committer
Colin Walters
<walters@verbum.org>
Thu, 6 Sep 2012 13:23:06 +0000
(09:23 -0400)
We need to ensure we get the exact same byte-level GVariant, so
byteswap on big endian architectures.
https://bugzilla.gnome.org/show_bug.cgi?id=683384
glib/tests/gvariant.c
patch
|
blob
|
history
diff --git
a/glib/tests/gvariant.c
b/glib/tests/gvariant.c
index 4e8282d297e357191622c7fe8032e1d40dc4fe82..968b703ba25d8ae9060063ab51e6ce56c399d8c9 100644
(file)
--- a/
glib/tests/gvariant.c
+++ b/
glib/tests/gvariant.c
@@
-4201,6
+4201,13
@@
verify_gvariant_checksum_va (const gchar *sha256,
v = g_variant_new_va (fmt, NULL, &args);
g_variant_ref_sink (v);
+#if G_BYTE_ORDER == G_BIG_ENDIAN
+ {
+ GVariant *byteswapped = g_variant_byteswap (v);
+ g_variant_unref (v);
+ v = byteswapped;
+ }
+#endif
va_end (args);