[Xcb] [PATCH libxcb 12/18] c_client.py: don't add /* <name> */ before references to 'S'

Christian Linhart chris at DemoRecorder.com
Mon Oct 13 09:02:02 PDT 2014


This removes only a comment in the output.
So the C-code will generate the same binary.
And it simplifies the generator which is good.

Reviewed-by: Christian Linhart <chris at demorecorder.com>

On 10/12/14 20:58, Ran Benita wrote:
> The name can be understood from the type of S already.
> 
> For examples, look for 'S->' in xkb.c or xinput.c.
> 
> Signed-off-by: Ran Benita <ran234 at gmail.com>
> ---
>  src/c_client.py | 6 ++----
>  1 file changed, 2 insertions(+), 4 deletions(-)
> 
> diff --git a/src/c_client.py b/src/c_client.py
> index c1839c7..eab4006 100644
> --- a/src/c_client.py
> +++ b/src/c_client.py
> @@ -1541,8 +1541,7 @@ def _c_accessors_list(self, field):
>          fields.update(_c_helper_field_mapping(toplevel_switch, [('S', '->', toplevel_switch)], flat=True))
>  
>          # initialize prefix for everything "below" S
> -        prefix_str = '/* %s */ S' % toplevel_switch.name[-1]
> -        prefix = [(prefix_str, '->', toplevel_switch)]
> +        prefix = [('S', '->', toplevel_switch)]
>  
>          # look for fields in the remaining containers
>          for p in parents[2:] + [self]:
> @@ -2398,8 +2397,7 @@ def _man_request(self, name, cookie_type, void, aux):
>                  fields.update(_c_helper_field_mapping(toplevel_switch, [('S', '->', toplevel_switch)], flat=True))
>  
>                  # initialize prefix for everything "below" S
> -                prefix_str = '/* %s */ S' % toplevel_switch.name[-1]
> -                prefix = [(prefix_str, '->', toplevel_switch)]
> +                prefix = [('S', '->', toplevel_switch)]
>  
>                  # look for fields in the remaining containers
>                  for p in parents[2:] + [self]:



More information about the Xcb mailing list