[Xcb] Question about XML spec, and QueryExtension

Antoine Latter aslatter at gmail.com
Sun Aug 24 09:40:37 PDT 2008


Folks,

The XML describing QueryExtension is stated as:

>>>>>
 <request name="QueryExtension" opcode="98">
    <pad bytes="1" />
    <field type="CARD16" name="name_len" />
    <list type="char" name="name">
      <fieldref>name_len</fieldref>
    </list>
    <reply>
      <pad bytes="1" />
      <field type="BOOL" name="present" />
      <field type="CARD8" name="major_opcode" />
      <field type="CARD8" name="first_event" />
      <field type="CARD8" name="first_error" />
    </reply>
  </request>
<<<<<

However the written specification puts two padding bytes in-between
"name_len" and "name":

>>>>>
QueryExtension
1 98 opcode
1 unused
2 2+(n+p)/4 requestlength
2 n  length of name
2 unused                      <---- this right here
n STRING8 name
p unused, p=pad(n)
<<<<<

And my code geberated from the XML doesn't work unless I include the
two-bytes padding.  (I either get length-errors for short inputs or
extension-not-present responses for extensions I know are present).

The XCB xproto.h doesn't include the padding either - and it's used
extensively in xcb_ext.c, which makes me think that if QueryExtension
were broken extensions in general would be broken.

Am I missing something here?  Presumably extensions work in XCB.

Thanks,
Antoine


More information about the Xcb mailing list