From 413f4a5b2123c1625d615315db293a080078482b Mon Sep 17 00:00:00 2001 From: Ole Troan Date: Wed, 28 Nov 2018 11:36:05 +0100 Subject: API: Use string type instead of u8. The new string type is modelled after string in proto3. It is always variable length. Change-Id: I64884067e28a80072c8dac31b7c7c82d6e306051 Signed-off-by: Ole Troan Signed-off-by: Michal Cmarada Signed-off-by: Ole Troan --- src/tools/vppapigen/vppapigen_json.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'src/tools/vppapigen/vppapigen_json.py') diff --git a/src/tools/vppapigen/vppapigen_json.py b/src/tools/vppapigen/vppapigen_json.py index b57e16c990d..a4707c0cd60 100644 --- a/src/tools/vppapigen/vppapigen_json.py +++ b/src/tools/vppapigen/vppapigen_json.py @@ -32,19 +32,18 @@ def walk_defs(s): d = [] d.append(t.name) for b in t.block: - f = [] if b.type == 'Field': - f = [b.fieldtype, b.fieldname] + d.append([b.fieldtype, b.fieldname]) elif b.type == 'Array': if b.lengthfield: - f = [b.fieldtype, b.fieldname, b.length, b.lengthfield] + d.append([b.fieldtype, b.fieldname, b.length, b.lengthfield]) else: - f = [b.fieldtype, b.fieldname, b.length] + d.append([b.fieldtype, b.fieldname, b.length]) elif b.type == 'Union': - print('UNION') + pass else: raise ValueError("Error in processing array type %s" % b) - d.append(f) + if t.crc: c = {} c['crc'] = "{0:#0{1}x}".format(t.crc, 10) -- cgit 1.2.3-korg