Changeset b8f433e in mainline


Ignore:
Timestamp:
2014-09-08T19:58:40Z (10 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9827b5b
Parents:
cf7ad06
Message:

Support one-dimensional arrays as struct members in autogen.py.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tools/autogen.py

    rcf7ad06 rb8f433e  
    5555        for i in range(len(struct['members'])):
    5656                member = struct['members'][i]
    57                 code = code + "\t%s %s;\n" % (member['type'], member['name'])
     57                if 'elements' in member.keys():
     58                        code = code + "\t%s %s[%d];\n" % (member['type'], member['name'], member['elements'])
     59                else:
     60                        code = code + "\t%s %s;\n" % (member['type'], member['name'])
    5861        code = code + "} %s_t;" % struct['name']
    5962        return code
Note: See TracChangeset for help on using the changeset viewer.