[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freedesktop-xcb
Subject:    [Xcb] [PUSHED][PATCH libxcb 1/1] do not serialize pads by default anymore
From:       Christian Linhart <chris () DemoRecorder ! com>
Date:       2016-02-01 7:04:47
Message-ID: 56AF038F.6040804 () DemoRecorder ! com
[Download RAW message or body]

Hi,

I've just pushed the libxcb part of this fix.
I posted this about two weeks ago, and there was neither complaint nor review.
Therefore pushed due to review-by-crickets.

I you find bugs in there later, please post a patch to fix these bugs.

Chris


On 2016-01-18 06:56, Christian Linhart wrote:
> Pads should not be serialized/deserialized to maintain
> ABI compatibility when adding explicit align pads.
> 
> Therefore this pad switches off serialization of pads
> unless it is enforced by serialize=true in the xml-definition
> of that pad
> 
> Signed-off-by: Christian Linhart <chris@demorecorder.com>
> ---
> src/c_client.py | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/src/c_client.py b/src/c_client.py
> index 3230a6f..57de3fb 100644
> --- a/src/c_client.py
> +++ b/src/c_client.py
> @@ -2103,15 +2103,16 @@ def _c_complex(self, force_packed = False):
> def _c_complex_field(self, field, space=''):
> if (field.type.fixed_size() or self.is_union or
> # in case of switch with switch children, don't make the field a pointer
> # necessary for unserialize to work
> (self.is_switch and field.type.is_switch)):
> spacing = ' ' * (maxtypelen - len(field.c_field_type))
> _h('%s    %s%s %s%s;', space, field.c_field_type, spacing, field.c_field_name, \
>                 field.c_subscript)
> -        else:
> +        elif (not field.type.is_pad) or field.type.serialize:
> +            # serialize everything except pads (unless serialization of pads is \
> enforced by serialize=true) spacing = ' ' * (maxtypelen - (len(field.c_field_type) \
> + 1)) _h('%s    %s%s *%s%s;', space, field.c_field_type, spacing, \
> field.c_field_name, field.c_subscript) 
> if not self.is_switch:
> for field in struct_fields:
> _c_complex_field(self, field)
> else:

_______________________________________________
Xcb mailing list
Xcb@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/xcb


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic