X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=typescript_strings.py;h=542487bc463fca2ff6b3e945f5c58fcb6c535a75;hb=refs%2Fheads%2F2021-03-init-util;hp=cb1f3828fc06dd4211043435082216d1992d663c;hpb=d236cdeb79c96691aff80ccb7d546220ed9b94d8;p=ldk-java diff --git a/typescript_strings.py b/typescript_strings.py index cb1f3828..542487bc 100644 --- a/typescript_strings.py +++ b/typescript_strings.py @@ -82,6 +82,9 @@ public static native long new_empty_slice_vec(); } """ + self.util_fn_pfx = "" + self.util_fn_sfx = "" + self.common_base = """ export default class CommonBase { ptr: number; @@ -1053,9 +1056,9 @@ const decodeString = (stringPointer, free = true) => { elif info.from_hu_conv is not None and info.from_hu_conv[1] != "": if not takes_self and return_type_info.to_hu_conv_name is not None: out_java_struct += ( - "\t\t" + info.from_hu_conv[1].replace("this", return_type_info.to_hu_conv_name) + ";\n") + "\t\t" + info.from_hu_conv[1].replace("this", return_type_info.to_hu_conv_name).replace("\n", "\n\t\t") + ";\n") else: - out_java_struct += ("\t\t" + info.from_hu_conv[1] + ";\n") + out_java_struct += ("\t\t" + info.from_hu_conv[1].replace("\n", "\n\t\t") + ";\n") if return_type_info.to_hu_conv_name is not None: out_java_struct += ("\t\treturn " + return_type_info.to_hu_conv_name + ";\n")