From f08fd69fc556d13f1a47fac8bfa02c7312ff650d Mon Sep 17 00:00:00 2001 From: Sven Robertz <sven@cs.lth.se> Date: Wed, 20 Feb 2013 18:07:00 +0100 Subject: [PATCH] Java decodes var arrays properly --- compiler/Java_CodeGen.jrag | 2 +- examples/simple/example_encoder.c | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/compiler/Java_CodeGen.jrag b/compiler/Java_CodeGen.jrag index 40c0e1b..3331299 100644 --- a/compiler/Java_CodeGen.jrag +++ b/compiler/Java_CodeGen.jrag @@ -578,7 +578,7 @@ aspect Java_Class { } public void VariableSize.Java_emitDecoder(Java_env env) { - env.print("d.decodeInt()"); + env.print("d.decodePacked32()"); } public void StructType.Java_emitDecoder(Java_env env, String name) { diff --git a/examples/simple/example_encoder.c b/examples/simple/example_encoder.c index 689d12c..70a38c8 100644 --- a/examples/simple/example_encoder.c +++ b/examples/simple/example_encoder.c @@ -41,6 +41,7 @@ int main(int argc, char *argv[]) { foo[k] = k; } + printf("Encoding TwoArrays...\n"); labcomm_encode_simple_TwoArrays(encoder, &ta); ti.a = 23; -- GitLab