diff options
author | Ole Troan <ot@cisco.com> | 2018-03-06 17:45:32 +0100 |
---|---|---|
committer | Neale Ranns <nranns@cisco.com> | 2018-03-07 10:37:49 +0000 |
commit | 52ca756c3a4f28c7ef961545ac8e1289fd747b63 (patch) | |
tree | 487937627d93693133a92f865d3e9fa275bfae3f /src/vpp-api/vapi/vapi_json_parser.py | |
parent | c22fcba177bad2c755fdb6d4d52f2a799eceaf34 (diff) |
VAPI: Ensure type definitions are generated in same order as .api file.
The previous use of a dictionary instead of a list led to typedefs being generated in wrong order.
Change-Id: Iee6ff73f920883ce6e599180c1b47fe997c1702e
Signed-off-by: Ole Troan <ot@cisco.com>
Diffstat (limited to 'src/vpp-api/vapi/vapi_json_parser.py')
-rw-r--r-- | src/vpp-api/vapi/vapi_json_parser.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/vpp-api/vapi/vapi_json_parser.py b/src/vpp-api/vapi/vapi_json_parser.py index 3c9bff10824..b52b95be6dc 100644 --- a/src/vpp-api/vapi/vapi_json_parser.py +++ b/src/vpp-api/vapi/vapi_json_parser.py @@ -276,7 +276,7 @@ class JsonParser(object): def parse_json_file(self, path): self.logger.info("Parsing json api file: `%s'" % path) self.json_files.append(path) - self.types_by_json[path] = {} + self.types_by_json[path] = [] self.messages_by_json[path] = {} with open(path) as f: j = json.load(f) @@ -290,7 +290,7 @@ class JsonParser(object): self.exceptions.append(e) continue self.types[type_.name] = type_ - self.types_by_json[path][type_.name] = type_ + self.types_by_json[path].append(type_) self.logger.debug("Parsed type: %s" % type_) for m in j['messages']: try: |