[Xcb] xcb-util compiling problems

Barton C Massey bart at cs.pdx.edu
Thu Mar 12 09:54:15 PDT 2009


In message <eaa105840903111602h73648243i7aecefd6c8d09318 at mail.gmail.com> you wrote:
> On Wed, Mar 11, 2009 at 1:48 PM, Barton C Massey wrote:
> > My current preference would be to do xcb_window_enum_t
> 
> [Bikeshed: As long as we're making up new names, I'd rather not
> intrude on POSIX reserved namespace -- *_t -- not that xcb_* is too
> likely to ever collide, so I don't feel all that strongly about it.]

I feel a bit strongly the other way: POSIX is using an
long-established convention of ending type names with _t,
that seems to me useful to programmers for keeping track of
what's going on.  As you say, the xcb_ on the front should
be sufficient to keep us out of the POSIX namespace.

> > for
> > just the ones that are altenum, and leave non-altenums
> > as-is. We know that this won't collide on any existing
> > stuff, and I'd be surprised if it did on new stuff.
> >
> > Does this make sense?
> 
> Hmm, not really. 'altenum' is a reference to an otherwise ordinary
> enum. There is no way to determine how an enum will be used until it
> actually gets used. Some (eg InputFocus) are even used as both an enum
> and an altenum.
> 
> That's why I suggested a white list of known-to-not-collide enums, for
> which a backwards compatible type name could be generated. *_enum_t
> for every enum not on that list.
> 
> Alternatively, the libxcb generator should know when a name will
> collide (since its code generator is not streamy), and could generate
> the *_enum_t form whenever it sees a collision.

This last is what I was trying to suggest, actually.  AFAIK
there will only be a collision for names that have at least
one altenum form use?

    Bart


More information about the Xcb mailing list