diff options
author | Marek Gradzki <mgradzki@cisco.com> | 2016-06-15 16:38:33 +0200 |
---|---|---|
committer | Dave Wallace <dwallacelf@gmail.com> | 2016-06-24 13:23:16 +0000 |
commit | fa42e25c4e498c57e15ebb0ded56502a61b7dc08 (patch) | |
tree | a6a79850ddab1e962c9f639050a09925fe57c9f0 /vpp-api/python/pneum/api-gen.py | |
parent | 80ee21386cea217d0e9292d2a8b15ea88bf99d30 (diff) |
VPP-118: add support for variable length arrays to jvpp
* extends VPP's message definition language with the following syntax:
u32 count:
u8 array[count];
which is traslated to:
u32 count;
u8 array[0];
but now, python API representation generated by vppapigen
contains information about where the array length is stored.
* modifies existing response messages to use the new syntax
Change-Id: I68210bc7a3a755d03d067e9b79a567f40e2d31f3
Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'vpp-api/python/pneum/api-gen.py')
-rwxr-xr-x | vpp-api/python/pneum/api-gen.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vpp-api/python/pneum/api-gen.py b/vpp-api/python/pneum/api-gen.py index df92c196fe2..081fb983539 100755 --- a/vpp-api/python/pneum/api-gen.py +++ b/vpp-api/python/pneum/api-gen.py @@ -67,7 +67,7 @@ def get_pack(t): j = -1 for i in t: j += 1 - if len(i) is 3: + if len(i) is 3 or len(i) is 4: # TODO: add support for variable length arrays (VPP-162) size = type_size[i[0]] bytecount += size * int(i[2]) # Check if we have a zero length array |