[Xcb] about api changes

Christoph Pfister christophpfister at gmail.com
Thu Jun 7 12:08:57 PDT 2007


2007/6/7, Christoph Pfister <christophpfister at gmail.com>:
<snip>
> Ideally (at least imho) we wouldn't have those iterator structures anymore
> (okay - this might be a bit heavy for an api breakage), but instead elements
> with adjacent memory positions where possible (/me has to investigate a bit
> there and look how realistic that would be).
<snip>

Okay - I realised that data is sometimes interleaved (e.g. depth /
visual / depth / visual). But a problem remains - when can I simply
increase the pointer and when do I have to use the _next function
(right - if a _next function is present it has to be used in the
current situation).
Hmhmhm - that would still be possible with an approach where you have
xcb_...s() and xcb_..._length() (btw - why is that function not called
_count or something like that?); you would have a xcb_..._next()
function for interleaved data which would be hopefully sufficent.
(Same way to deal with the items as now: if _next is present you have
to use it otherwise simply increment the pointer).

Christoph


More information about the Xcb mailing list