[Xcb] RFC: Altenum updates for xcb/proto

Barton C Massey bart at cs.pdx.edu
Wed Feb 25 10:55:13 PST 2009


In message <eaa105840902250634k5f25e667i8809d5ad19c61db6 at mail.gmail.com> you wrote:
> I'd like to avoid creating a whole plethora of new
> single-entry enums (XCB_WINDOW_NONE, XCB_PIXMAP_NONE,
> XCB_COLORMAP_NONE, XCB_CURSOR_NONE, XCB_ATOM_NONE,
> XCB_FONT_NONE, and maybe even a few
> XCB_extension_newtype_NONE).

Why? I'd really prefer having them. They can be
auto-generated, after all, and sooner or later someone is
going to decide that XCB_RANDOMEXTENSIONTYPE_NONE is 17
instead of 0 for some reason and we'll have a problem if we
don't have them have unique names.  Further, in typed
languages you'll need them anyway for typechecking (correct,
Antoine?).

> While we're on the subject: The same issue crops up with CurrentTime.
> In my private branch, generated XCB_TIME_CURRENT_TIME duplicates the
> hard-coded XCB_CURRENT_TIME. Is this acceptable?

XCB_CURRENT_TIME is arguably a mistake; we should probably
keep it for backward compatibility, but it should be
deprecated in favor of XCB_TIME_CURRENT_TIME.

Thanks hugely for all your work on this.

    Bart


More information about the Xcb mailing list