summaryrefslogtreecommitdiffstats
path: root/java/jvpp/gen/jvppgen/jni_type_handlers_gen.py
diff options
context:
space:
mode:
authorMichal Cmarada <mcmarada@cisco.com>2019-05-03 08:49:28 +0200
committerMichal Cmarada <mcmarada@cisco.com>2019-05-03 08:49:28 +0200
commit84e13a8718f480485123999539997dd22702a349 (patch)
tree301d8fb83b84b6bd9937fb09e1363cb07e407f86 /java/jvpp/gen/jvppgen/jni_type_handlers_gen.py
parent6fc28b0523978a6eca6d7d6ce12b6807bf6492c0 (diff)
Fix enumset values for types other than u8(byte)
Usually enumsets use integer as its base type, however to reduce memory usage in VPP less memory consuming types can be used. This fixes enumset generator so other types can be used (byte, short...) Change-Id: I6c02153eecb879038f833491b0d7a4324d6ac102 Signed-off-by: Michal Cmarada <mcmarada@cisco.com>
Diffstat (limited to 'java/jvpp/gen/jvppgen/jni_type_handlers_gen.py')
-rwxr-xr-xjava/jvpp/gen/jvppgen/jni_type_handlers_gen.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/java/jvpp/gen/jvppgen/jni_type_handlers_gen.py b/java/jvpp/gen/jvppgen/jni_type_handlers_gen.py
index d0d123a..90fc101 100755
--- a/java/jvpp/gen/jvppgen/jni_type_handlers_gen.py
+++ b/java/jvpp/gen/jvppgen/jni_type_handlers_gen.py
@@ -187,7 +187,7 @@ static inline jobject _net_to_host_${c_name}(JNIEnv * env, vl_api_${c_name}_t _n
{
jclass enumClass = (*env)->FindClass(env, "${class_FQN}");
jmethodID constructor = (*env)->GetMethodID(env, enumClass, "<init>", "(I)V");
- ${jni_type} value = (${jni_type}) $type_swap
+ ${jni_type} value = (${jni_type}) $type_swap;
return (*env)->NewObject(env, enumClass, constructor, value);
}""")