[Xcb] [PATCH libxcb 10/7] c_client.py: don't generate _aux() request functions

Ran Benita ran234 at gmail.com
Tue Feb 25 11:57:21 PST 2014


On Tue, Feb 25, 2014 at 05:36:42AM -0800, Josh Triplett wrote:
> On Tue, Feb 25, 2014 at 02:11:37PM +0200, Ran Benita wrote:
> > Currently, for requests which take a parameter which needs to be
> > serialized (like some complex struct), there are two types of functions
> > generated:
> >     xbc_<request_name>{,checked,unchecked}
> >     xbc_<request_name>_aux{,checked,unchecked}
> > The difference between the aux and non-aux versions is how they handle
> > the complex argument(s):
> > 
> > - The aux version takes a type-safe instance of the struct, and
> >   internally calls the _serialize() function for this struct, which
> >   translates it to its wire representation.
> > 
> > - The non-aux version instead takes a void*, unpacks it to the struct in
> >   order to calculate the sizeof, and then sends it directly.
> > 
> > The non-aux version is not type-safe and expects the user to lay out the
> > data manually. People also don't know the aux version even exists, and
> > thus use the non-aux version incorrectly.
> > 
> > Therefore, remove the non-aux versions and drop the _aux prefix
> > entirely, and make the code-generator worry about one less obscurity on
> > the way.
> 
> As much as I'd love to see this change, this would break the library
> ABI.  That's not OK, and looking around for potential callers doesn't
> make it OK.

OK. I don't really agree, but can't argue with being careful.

> - Josh Triplett


More information about the Xcb mailing list