[Xcb] [PATCH proto 00/18] Use explicit enum values and use hex value

Peter Harris pharris at opentext.com
Mon Aug 19 08:22:55 PDT 2013


On 2013-08-18 10:54, Daniel Martin wrote:
> The last 2 patches use hex values instead of decimal values if
> applicable (if there was a comment with a hex value). The schema allows
> it, c_client.py passes them 1:1 into the header. So, I don't see why no
> one did that before (maybe didn't worked when those comments had been
> added, didn't checked).
> 
> Hex values can be more descriptive than decimal values. Examples:
> - In glx there was GL_ALL_ATTRIB_BITS=16777215, 16777215 is a big number
>   but I don't see directly that this is a number with all last bits set
>   to one, as 16777215 == 0x000ffffff.
> - In XKB have been enum items with 256, 512, 768, ... as values. Those
>   could've been changed to bits. But, the XKB spec. uses hex values
>   there: 0x100, 0x200, 0x300, ... So, I've choosen the hex values.

183ecffd8b681ca3922cfadfa26e0236a1e2d94f and
8b3c1209de3c4545f288b0a5c3bd395828f6da34 explicitly removed hex encoding
of values, in an attempt to better support other languages.

I agree that we should allow 0x hex notation in the xml and let
generators for other languages do the conversion if necessary. But we
should get another opinion from those who thought it worth removing
hexadecimal support in the first place before we go and revert their work.

Peter Harris
-- 
               Open Text Connectivity Solutions Group
Peter Harris                    http://connectivity.opentext.com/
Research and Development        Phone: +1 905 762 6001
pharris at opentext.com            Toll Free: 1 877 359 4866


More information about the Xcb mailing list