• Morten Welinder's avatar
    Standards: be C99 compliant when accessing GnmValue's type. · d660a287
    Morten Welinder authored
    There are three standards compliant ways of getting the tag field
    for a union like GnmValue.
    1. Via the subtype struct that the value has.  That only works (and
       is utterly pointless) when we already know the value type.
    2. Via another union member that is a structure having one or more
       initial members matching the actual struct type.  The silly thing
       is that this rule only applies to structs; I guess that is an
       oversight, but a fat lot of good that does us now.  In practice
       this means we should use ->v_any.type for that.
    3. Using the pointer-to-first-struct-member rule.
    To simplify matters, define VALUE_IS_ARRAY and VALUE_IS_CELLRANGE
sort.c 8.1 KB