Re: Variant tests failing on big endian machines





----- Original Message -----
From: "Rafael dos Santos" <rdossant redhat com>
To: "gtk-perl-list" <gtk-perl-list-bounces gnome org>
Sent: Friday, 26 June, 2015 12:08:38 PM
Subject: Variant tests failing on big endian machines

Hi,

the variant tests added with commit d0c52b8bb are failing on big endian
machines. As it can be seen from the log output below, the VariantClass
field is always empty.

Could somebody help me debug the issue and/or point me on the right direction
about looking into it?

I found the culprit. On the GVariant.xs file, we have:

const char * g_variant_classify (GVariant *value);
    PREINIT:
        GVariantClass vclass;
    CODE:
        vclass = g_variant_classify (value);
        RETVAL = (const char *) &vclass;
    OUTPUT:
        RETVAL

The RETVAL value will be arch-dependent because of the way it's accessed. I'm not familiar with .xs syntax, 
so what's the way to deal with endianness on this type of files?


Att
--
Rafael Fonseca


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]