diff options
author | Bart Massey <bart@cs.pdx.edu> | 2008-08-31 00:42:23 -0700 |
---|---|---|
committer | Bart Massey <bart@cs.pdx.edu> | 2008-09-03 11:58:14 -0700 |
commit | 7e0674e76186ee4491a089350511fc0d22fb3af3 (patch) | |
tree | d557ac4661e7a81e3645c00e02cfa7afc4ccb677 /src | |
parent | 2d04a1e6cedcdc832e2db3c65ababc3aff904ec4 (diff) |
added small fix to support trailing fixed fields; also warning for non-pad fixed fields
Diffstat (limited to 'src')
-rwxr-xr-x | 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) |