[HarfBuzz] enum issue

Jonathan Kew jfkthame at googlemail.com
Tue Mar 4 12:31:07 PST 2014


On 4/3/14 18:47, Behdad Esfahbod wrote:
> How about:
>
>    _HB_SCRIPT_DUMMY1 = 0x7FFFFFFF,
>    _HB_SCRIPT_DUMMY2
>
> The idea being that DUMMY2 gets value of 0x80000000, ensuring that hb_script_t
> can represent up to 0xFFFFFFFF.

In practice I expect that should work, but IIRC a strict reading of the 
C++ standard would suggest that it leaves the behavior for values from 
_HB_SCRIPT_DUMMY2 to 0xFFFFFFFF undefined, as they're not part of the 
range of the enum's values. It's hard to imagine that a compiler would 
do anything too weird with it, however.

JK



More information about the HarfBuzz mailing list