[Xcb] [PATCH libxcb 10/7] c_client.py: don't generate _aux() request functions
Josh Triplett
josh at joshtriplett.org
Tue Feb 25 05:36:42 PST 2014
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.
- Josh Triplett
More information about the Xcb
mailing list