diff options
author | Christian Linhart <chris@demorecorder.com> | 2016-01-18 06:52:02 +0100 |
---|---|---|
committer | Christian Linhart <chris@demorecorder.com> | 2016-01-27 06:39:14 +0100 |
commit | 21b11ee553a0bf074e9672be9107e11c97704195 (patch) | |
tree | 689ea65518835c71fdfdc274cdd201ce02f99c77 /xcbgen | |
parent | 811e038c9501dfe95301d5f148be1f2b1bafbc1e (diff) | |
download | xcb-proto-21b11ee553a0bf074e9672be9107e11c97704195.tar.gz |
optionally enforce serialization of pads
From now on, due to a patch in libxcb, pads will not be serialized
anymore. This is to maintain ABI-compatibility when adding
explicit align pads.
However, some align pads were already be serialized in prior
official versions of libxcb. Therefore we need a method to
enforce serialization, so we can maintainn ABI compatibility
with that legacy.
Signed-off-by: Christian Linhart <chris@demorecorder.com>
Diffstat (limited to 'xcbgen')
-rw-r--r-- | xcbgen/xtypes.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/xcbgen/xtypes.py b/xcbgen/xtypes.py index 1f604de..c3b5758 100644 --- a/xcbgen/xtypes.py +++ b/xcbgen/xtypes.py @@ -6,6 +6,7 @@ from xcbgen.align import Alignment, AlignmentLog import __main__ verbose_align_log = False +true_values = ['true', '1', 'yes'] class Type(object): ''' @@ -429,6 +430,7 @@ class PadType(Type): if elt != None: self.nmemb = int(elt.get('bytes', "1"), 0) self.align = int(elt.get('align', "1"), 0) + self.serialize = elt.get('serialize', "false").lower() in true_values # pads don't require any alignment at their start self.required_start_align = Alignment(1,0) |