[PATCH] added small fix to support trailing fixed fields; also warning for non-pad fixed fields
Bart Massey
bart at cs.pdx.edu
Sun Aug 31 00:42:23 PDT 2008
---
src/c_client.py | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diff --git a/src/c_client.py b/src/c_client.py
index 1c6ad16..db974e0 100755
--- a/src/c_client.py
+++ b/src/c_client.py
@@ -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)
--
1.5.6.3
------- =_aaaaaaaaaa0--
More information about the Xcb
mailing list