[Xcb] xcb_aux.h patch for use with C++

Ulrich Eckhardt doomster at knuut.de
Mon Sep 29 12:55:31 PDT 2008


Hi!

The patch addresses a few things which are needed for use with C++:

- Use 'class_' instead of 'class' as parameter name. At the same time, I 
replaced '_class' with 'class_', because anything beginning with an 
underscore might be a reserved global. This is just to be rather safe than 
sorry.

- Rewrite XCB_AUX_ADD_PARAM to not rely on void-pointer arithmetic, which 
simply isn't allowed in C++. Further, I renamed _XCB_AUX_OFFSETOF to 
XCB_AUX_INTERNAL_OFFSETOF, because macros beginning with a leading underscore 
followed by a capital are also reserved to the compiler implementor. I also 
tried to document what the macros do and how (I hope I guessed right).

cheers

Uli
-------------- next part --------------
A non-text attachment was scrubbed...
Name: xcb_aux.h.diff
Type: text/x-diff
Size: 2285 bytes
Desc: not available
Url : http://lists.freedesktop.org/archives/xcb/attachments/20080929/d6fcebbd/attachment.diff 


More information about the Xcb mailing list