X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=gen_type_mapping.py;h=f57592f40fadf1926105996ae7d15c1e087e68ca;hb=2fd040ea4089280c50161a98fca36f254f6791b9;hp=371868f98faeb9a51b2cb37dbea3098925d50459;hpb=e779be340c599055d6af50e66b7c7163009e4306;p=ldk-java diff --git a/gen_type_mapping.py b/gen_type_mapping.py index 371868f9..f57592f4 100644 --- a/gen_type_mapping.py +++ b/gen_type_mapping.py @@ -330,7 +330,13 @@ class TypeMappingGenerator: from_hu_conv = from_hu_conv + ", " conv.var_name = ty_info.var_name + "_" + chr(idx + ord("a")) conv_map = self.map_type_with_info(conv, False, None, is_free, holds_ref) - to_hu_conv_pfx = to_hu_conv_pfx + conv.java_ty + " " + ty_info.var_name + "_" + chr(idx + ord("a")) + " = " + "bindings." + self.tuple_types[ty_info.rust_obj][1] + "_get_" + chr(idx + ord("a")) + "(" + ty_info.var_name + ");\n" + to_hu_conv_pfx = to_hu_conv_pfx + conv.java_ty + " " + ty_info.var_name + "_" + chr(idx + ord("a")) + " = " + if not conv.is_native_primitive and (conv_map.rust_obj.replace("LDK", "") + "_clone") in self.clone_fns and conv_map.rust_obj == "LDKTxOut": + to_hu_conv_pfx = to_hu_conv_pfx + "bindings." + conv_map.rust_obj.replace("LDK", "") + "_clone(" + to_hu_conv_pfx = to_hu_conv_pfx + "bindings." + self.tuple_types[ty_info.rust_obj][1] + "_get_" + chr(idx + ord("a")) + "(" + ty_info.var_name + ")" + if not conv.is_native_primitive and (conv_map.rust_obj.replace("LDK", "") + "_clone") in self.clone_fns and conv_map.rust_obj == "LDKTxOut": # XXX + to_hu_conv_pfx = to_hu_conv_pfx + ")" + to_hu_conv_pfx = to_hu_conv_pfx + ";\n" if conv_map.to_hu_conv is not None: to_hu_conv_pfx = to_hu_conv_pfx + conv_map.to_hu_conv + ";\n" to_hu_conv_sfx = to_hu_conv_sfx + conv_map.to_hu_conv_name