[Xcb] size annotations for XML-XCB, and other tools

Jamey Sharp jamey at minilop.net
Thu Jun 15 10:44:08 PDT 2006


On Thu, Jun 15, 2006 at 11:01:04AM -0400, Jeremy A. Kolb wrote:
> I don't this seems to take into account the padding at the 
> end of requests/replies when not explicitly marked.

True. In fact it doesn't automatically compute padding at all, yet, or
the size of requests/replies. The latter addresses your concern most
directly: it doesn't do it at all so it can't be doing it wrong. :-)

Note that a fair amount of padding can't be automatically computed, as
far as I can tell, though some of it can. <pad bytes="5" /> appears once
or twice even though natural alignment only requires <pad bytes="1" />.

Also, the large padding before <list>s in replies is, I think, not a
hard requirement so some extension might omit it eventually. Although
since none currently does, I guess I should auto-generate that padding
and we can add a <reply pad-end="false"> attribute or something later.

On the other hand, with this size information we can eliminate all those
<pad bytes="1" /> tags at the beginning of the core requests.

> Are we going to do the Xlib thing where each req/rep is going to have a 
> #defined size?  Would that be useful?

No. In C, we have sizeof(). :-)

This annotation is so that code generators (in particular, c-client.xsl)
can do a better job. I think it's unlikely the computed sizes will wind
up in the generated code verbatim, except maybe in trivial cases where
it doesn't matter.

--Jamey
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.freedesktop.org/archives/xcb/attachments/20060615/c6708df6/attachment.pgp


More information about the Xcb mailing list