mirror of
https://gitlab.freedesktop.org/xorg/lib/libxcb.git
synced 2026-05-07 07:18:07 +02:00
added small fix to support trailing fixed fields; also warning for non-pad fixed fields
This commit is contained in:
parent
2d04a1e6ce
commit
7e0674e761
1 changed files with 7 additions and 1 deletions
|
|
@ -635,9 +635,15 @@ def _c_complex(self):
|
|||
struct_fields = []
|
||||
maxtypelen = 0
|
||||
|
||||
varfield = None
|
||||
for field in self.fields:
|
||||
if not field.type.fixed_size():
|
||||
break
|
||||
varfield = field.c_field_name
|
||||
continue
|
||||
if varfield != None and not field.type.is_pad:
|
||||
errmsg = '%s: warning: variable field %s followed by fixed field %s\n' % (self.c_type, varfield, field.c_field_name)
|
||||
sys.stderr.write(errmsg)
|
||||
# sys.exit(1)
|
||||
if field.wire:
|
||||
struct_fields.append(field)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue