X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=java_strings.py;h=ccde06e5806d73edabb5d19d7fe9115b3090b3ef;hb=9b9e4369d34e24a9dc7f3f1494865a026ca4a6ef;hp=3a72a5b8d83a27d4579c7f658df149ccfed293d3;hpb=e2aa598aa07fde645c4fab04df6f49db84a5e6db;p=ldk-java diff --git a/java_strings.py b/java_strings.py index 3a72a5b8..ccde06e5 100644 --- a/java_strings.py +++ b/java_strings.py @@ -106,6 +106,7 @@ import org.ldk.impl.bindings; import org.ldk.enums.*; import org.ldk.util.*; import java.util.Arrays; +import java.lang.ref.Reference; import javax.annotation.Nullable; public class UtilMethods { @@ -1209,7 +1210,7 @@ import javax.annotation.Nullable; out_java_struct += "\tpublic static " + return_type_info.java_hu_ty + " with_default(" else: out_java_struct += "\tpublic static " + return_type_info.java_hu_ty + " " + meth_n + "(" - elif meth_n == "clone_ptr": + elif meth_n == "clone_ptr" or (struct_meth.startswith("LDKCResult") and (meth_n == "get_ok" or meth_n == "get_err")): out_java_struct += ("\t" + return_type_info.java_hu_ty + " " + meth_n + "(") else: if meth_n == "hash" and return_type_info.java_hu_ty == "long":