diff options
author | 2019-01-04 13:29:25 +0100 | |
---|---|---|
committer | 2019-01-04 13:29:25 +0100 | |
commit | 6ebc6eb3d27e0abbc66dbb2548808e1a338f89b4 (patch) | |
tree | 2d5348da51e9a16099eb904efbae49845b99177a /extras/japi/java/jvpp/gen/jvppgen/jni_impl_gen.py | |
parent | b56fcf14d8a8801b24d373f519b36df2b2879b72 (diff) |
VPP-1525: additional fixes for strings in Japi
Change-Id: Ic5aa09fdc360cdded16d3c4693f0d4b2067f66d6
Signed-off-by: Michal Cmarada <mcmarada@cisco.com>
Diffstat (limited to 'extras/japi/java/jvpp/gen/jvppgen/jni_impl_gen.py')
-rwxr-xr-x | extras/japi/java/jvpp/gen/jvppgen/jni_impl_gen.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/extras/japi/java/jvpp/gen/jvppgen/jni_impl_gen.py b/extras/japi/java/jvpp/gen/jvppgen/jni_impl_gen.py index 717a42c452a..2941778f208 100755 --- a/extras/japi/java/jvpp/gen/jvppgen/jni_impl_gen.py +++ b/extras/japi/java/jvpp/gen/jvppgen/jni_impl_gen.py @@ -111,5 +111,6 @@ def _generate_msg_size(msg): _size_components += " + %s*sizeof(%s)" % (field.array_len_field.java_name, field.type.base_type.vpp_name) # FIXME(VPP-586): for proper nested structures support, we need generate functions computing type sizes # and use it instead of sizeof - + if field.type.name == "string": + _size_components += " + jstr_length(env, %s) * sizeof(u8)" % field.name return msg_size + "".join(_size_components) |