[Xcb] xid
Josh Triplett
josh at freedesktop.org
Wed Oct 11 22:34:55 PDT 2006
Russell Shaw wrote:
> I see that:
>
> typedef uint32_t xcb_cursor_t;
> typedef uint32_t xcb_font_t;
> typedef uint32_t xcb_gcontext_t;
> typedef uint32_t xcb_colormap_t;
> ...
>
> are just a substitute for uin32_t xid.
>
> Wouldn't it be cleaner, simpler, and more logical just to use
> "typedef uint32_t xcbid" everywhere?
Possibly, but for several reasons we didn't want to do this:
1) The typedefs make for more self-documenting code. If you see a
protocol description and it takes an xcb_window_t, you know that it
operates on a window.
2) The typedefs reduce the amount of older code that needs changing.
3) The typedefs do no harm to compiled code or ABI.
3) The typedefs reduced the amount of XSLT that needed changing. :)
- Josh Triplett
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 252 bytes
Desc: OpenPGP digital signature
Url : http://lists.freedesktop.org/archives/xcb/attachments/20061011/1506ee6a/signature.pgp
More information about the Xcb
mailing list