[Xcb] XSync extension broken in many ways..

Rob Taylor rob.taylor at codethink.co.uk
Mon Sep 3 09:05:23 PDT 2007


Barton C Massey wrote:
> In message <200709031335.11266.hto at arcor.de> you wrote:
>> I am still fighting with XKB. When that is done I'd like include my 
>> new python generator into XCB (as an option in ./configure) [1].
> 
> I think the plan is rather to throw the XSLT one away at
> that point...
> 
>> The new generator counts the expected size of structs and could 
>> generate the alternative sizeof using a #define.
> 
> Very nice.
> 
>> But why not use the defines unconditionally? The generator could emit:
>>
>>     #define SZ_SOMESTRUCT size
>>
>> and use that everywhere instead of
>>
>>     sizeof(somestruct)
> 
> That sounds sensible.
> 
> My only concern with that plan is that miscounts due to
> wacky C compilers are going to be hard to detect.  Perhaps
> part of "make check" should be a little test program that
> compares the each of defines with its sizeof?
>

The point is that the size of the struct on the wire *doesn't* match up
with the compilers sizeof already. You'd use SZ_SOMESTRUCT wherever
you're talking about the size on the wire.

Thanks
Rob


More information about the Xcb mailing list