summaryrefslogtreecommitdiffstats
path: root/src/tools/vppapigen/vppapigen_json.py
diff options
context:
space:
mode:
authorOle Troan <ot@cisco.com>2019-04-23 17:11:01 +0200
committerAndrew Yourtchenko <ayourtch@gmail.com>2019-04-29 12:07:02 +0000
commit9ac113815511f3ce37b56a1331d6491fc36f7db5 (patch)
tree574f66ce291ee75de2545a051be77a11bbaa43e2 /src/tools/vppapigen/vppapigen_json.py
parentde146e5d5f7e919b423feeff3159c4ecd564c353 (diff)
API: Add support for limits to language.
string name [limit = 64]; Meta-data to do argument validation. Change-Id: I1f3e0f09b2d5285224399413d25206f77bd3f4b1 Signed-off-by: Ole Troan <ot@cisco.com>
Diffstat (limited to 'src/tools/vppapigen/vppapigen_json.py')
-rw-r--r--src/tools/vppapigen/vppapigen_json.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/tools/vppapigen/vppapigen_json.py b/src/tools/vppapigen/vppapigen_json.py
index c563a089949..94a9e19577e 100644
--- a/src/tools/vppapigen/vppapigen_json.py
+++ b/src/tools/vppapigen/vppapigen_json.py
@@ -33,7 +33,10 @@ def walk_defs(s):
d.append(t.name)
for b in t.block:
if b.type == 'Field':
- d.append([b.fieldtype, b.fieldname])
+ if b.limit:
+ d.append([b.fieldtype, b.fieldname, b.limit])
+ else:
+ d.append([b.fieldtype, b.fieldname])
elif b.type == 'Array':
if b.lengthfield:
d.append([b.fieldtype, b.fieldname, b.length, b.lengthfield])