mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-03 01:36:17 +01:00
tests/gvariant: Fix test on big endian architectures
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
This commit is contained in:
parent
02f143c2d9
commit
e6df67abe6
@ -4201,6 +4201,13 @@ verify_gvariant_checksum_va (const gchar *sha256,
|
|||||||
|
|
||||||
v = g_variant_new_va (fmt, NULL, &args);
|
v = g_variant_new_va (fmt, NULL, &args);
|
||||||
g_variant_ref_sink (v);
|
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);
|
va_end (args);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user