[Xcb] about api changes

Barton C Massey bart at cs.pdx.edu
Sat Jun 9 13:00:21 PDT 2007


In message <19a3b7a80706090629m7634c94bx4014113f8692bdb2 at mail.gmail.com> you wrote:
> There are in fact three ways with the current api:
> a) get a pointer to the first element + advance yourself
> b) get an iterater + advance yourself
> c) get an iterator + use the _next() function
> 
> a + b are possible for the continuous lists (where elements occupy
> adjacent memory positions); b + c are possible for the non-continuous
> lists (but b is in this case _horribly_ wrong).

Very clear summary--thanks!

My original intent was that (c) be possible for *all* list
types; I didn't realize that at some point we lost the
iterators for continuous lists, but IMHO we should put them
back.  (a) would then be a shortcut that only works for
continuous lists.  IMHO (b) is just a bad idea, since the
iterators are in general opaque.  As you say, if you know
you can do (a), you should just do (a), and otherwise you
should do (c).

This small change also preserves the current API/ABI, which
is a bonus.

My 2c --- YMMV.

    Bart


More information about the Xcb mailing list