[Xcb] Renaming errors: XCB* -> XCBBad*

Ian Osgood iano at quirkster.com
Fri Apr 28 16:01:26 PDT 2006

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.)


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

Version: GnuPG v1.4.1 (Darwin)


More information about the Xcb mailing list