[Xcb] xml description: removal of <op> fields

Thomas Hunger hto at arcor.de
Tue Feb 20 14:12:15 PST 2007


in the xml-description there are list fields which look like

    <list type="VISUALTYPE" name="visuals">

sometimes with some expression to calculate the length:

    <list type="KEYSYM" name="keysyms">
      <op op="*">

This is very verbose and only sensible if other languages than c 
implement the binary protocol. I believe that most language bindings 
will wrap the existing c functions. That means the lists could be 
rewritten to:

<list type="VISUALTYPE" name="visuals" length="visuals_len" />
<list type="KEYSYM" name="keysyms" length="length*4" />

or more complex:

<list type="void" name="data" length="data_len*format/8">

This is imo easier to think, write and parse. 

There is also an  <exprfield> with operator tags inside. I'd like to 
change this from

    <exprfield type="BOOL" name="odd_length">
      <op op="&amp;">

    <field type="BOOL" name="odd_length" value="string_len &amp; 1" />

What do you think?

More information about the Xcb mailing list