diff options
author | Christian Linhart <chris@demorecorder.com> | 2016-01-18 06:56:39 +0100 |
---|---|---|
committer | Christian Linhart <chris@demorecorder.com> | 2016-02-01 07:53:28 +0100 |
commit | b3516102b4469df99db39e0e354deae496867f35 (patch) | |
tree | 453a29baa60dc60ea45f80633df3cc2aeffb7565 /src | |
parent | c03388ff9e253b86e4b41fb77034ca6007fe47e9 (diff) |
do not serialize pads by default anymore
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/c_client.py | 3 |
1 files changed, 2 insertions, 1 deletions
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 @@ -2107,7 +2107,8 @@ def _c_complex(self, force_packed = False): (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) |