[Xcb] _iterator functions

Barton C Massey bart at cs.pdx.edu
Thu Aug 20 12:01:49 PDT 2009


In message <20090818034453.GA18287 at feather> you wrote:
> 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.

Agreed on both counts.

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

That seems fine to me.  Maybe the reason we didn't do this
10 years ago is that the "inline" keyword wasn't supported
by all the compilers we cared about?  I think it is now.

	Bart


More information about the Xcb mailing list