[Xcb] Renaming errors: XCB* -> XCBBad*
Ian Osgood
iano at quirkster.com
Fri Apr 28 16:01:26 PDT 2006
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
I had initially defined enum XCBAccess { Disabled, Enabled } for
SetAccessControl. This conflicted with the error #define XCBAccess.
I solved the immediate problem by renaming the enum to
XCBAccessControl. However, I still think the names for the error
codes are too generic. For instance, there is nothing in the name
"XCBValue" or "XCBCursor" that indicates that it is an error code
rather than some other entity.
(BTW, why do we have a separate typedef for each error response when
they are all essentially identical?)
As for the enumerations, we never actually use the typedefs, so it
seems like needless namespace pollution. (Although I can imagine
eventually annotating the protocol definitions to indicate that
particular fields take particular enumerations or special xid values.)
Ian
On Apr 28, 2006, at 3:35 PM, Jamey Sharp wrote:
> On Fri, Apr 28, 2006 at 02:26:34PM -0700, Ian Osgood wrote:
>> I'm moving the remainder of the constants in X.h to enums in
>> xproto.xml. But again, I've run into name conflicts with the error
>> codes. I propose to change the c-client.xsl to declare the error
>> codes to XCBBad* to retain similarity with Xlib's error codes. Any
>> objections?
>>
>> (Alternatively, we could stop explicitly naming our enumerations.)
>
> I don't understand the issue. What's conflicting in the generated code
> and why haven't we seen the problem before?
>
> --Jamey
> _______________________________________________
> Xcb mailing list
> Xcb at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/xcb
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)
iD8DBQFEUp7LHDwFgzc3zyIRAvVaAJwMKUpJX2SSroSjUPLMmN1t3f7XoQCfXi3k
q01QVaX7guVXwBgdd0QzOhg=
=FUy6
-----END PGP SIGNATURE-----
More information about the Xcb
mailing list