[Xcb] _iterator functions

Josh Triplett josh at joshtriplett.org
Mon Aug 17 20:44:54 PDT 2009


On Mon, Aug 17, 2009 at 07:41:14PM -0700, Barton C Massey wrote:
> In message <e2ed954f0908171011q766cb0e2kc1f29c31002c6569 at mail.gmail.com> you wrote:
> > > IIRC no one could quite figure out why one would need an iterator to
> > > access an array of ints.
> > 
> > Of course, that argument can be extended to any fixed-length type--in
> > other words, any type that we provide array accessors for today.
> > 
> > The reason we decided to provide iterators for fixed-length compound
> > types, even though they aren't necessary, was so that people don't have
> > to think about which interface is supported for each type, most of the
> > time. I think that was one of those "conversations in Bart's office"
> > kind of decisions that informed a lot of XCB's structure, though you've
> > expressed the same thought on the list since.
> 
> Yeah, now that you put it that way, I want to keep the
> iterators. :-)  They should be pretty easy to put back, I
> think.

Arguably, if we want the iterators for XID, we want them for base types
like uint{8,16,32}_t too.  That seems excessive, but acceptable.

(Somewhat more acceptable if we'd put them as header-file inlines rather
than actual functions in the library.)

- Josh Triplett


More information about the Xcb mailing list