X-Git-Url: http://git.bitcoin.ninja/index.cgi?p=ldk-java;a=blobdiff_plain;f=gen_type_mapping.py;h=10b2254606b5310065001483e777dddab3697e91;hp=517deb2f9c0203d36a55b6d360a04535daa2c064;hb=6108d1a32ba0b434521d3f0d9e4176c4d12de25b;hpb=03aa3308e672027e8a0be8365a7fc13e195a5c67 diff --git a/gen_type_mapping.py b/gen_type_mapping.py index 517deb2f..10b22546 100644 --- a/gen_type_mapping.py +++ b/gen_type_mapping.py @@ -196,6 +196,9 @@ class TypeMappingGenerator: to_hu_conv += "\t" + self.consts.var_decl_statement(subty.java_ty, conv_name, self.consts.get_java_arr_elem(subty, arr_name, idxc)) + ";\n" to_hu_conv += "\t" + subty.to_hu_conv.replace("\n", "\n\t") + "\n" to_hu_conv += "\t" + conv_name + "_arr[" + idxc + "] = " + subty.to_hu_conv_name + ";\n}" + cleanup = self.consts.cleanup_converted_native_array(ty_info, arr_name) + if cleanup is not None: + to_hu_conv += "\n" + cleanup to_hu_conv_name = conv_name + "_arr" from_hu_conv = self.consts.primitive_arr_from_hu(ty_info.subty, None, arr_name) if subty.from_hu_conv is not None: