X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;ds=sidebyside;f=java_strings.py;h=2ddecab7539aed909fc8f544515f4ec3497e1a0a;hb=b9db18546b69e614aa3f7548c853f37aa74181b3;hp=ed9381c4f42646e6057634408244ae8d4512692f;hpb=410a782fb7c7d3815a1b04be1d15a339dd5f2d03;p=ldk-java diff --git a/java_strings.py b/java_strings.py index ed9381c4..2ddecab7 100644 --- a/java_strings.py +++ b/java_strings.py @@ -849,7 +849,7 @@ import javax.annotation.Nullable; elif not fn_line.ret_ty_info.passed_as_ptr: out_c += "\t" + fn_line.ret_ty_info.c_ty + " ret = (*env)->Call" + fn_line.ret_ty_info.java_ty.title() + "Method(env, obj, j_calls->" + fn_line.fn_name + "_meth" else: - out_c = out_c + "\t" + fn_line.ret_ty_info.rust_obj + "* ret = (" + fn_line.ret_ty_info.rust_obj + "*)(*env)->CallLongMethod(env, obj, j_calls->" + fn_line.fn_name + "_meth" + out_c = out_c + "\tuint64_t ret = (*env)->CallLongMethod(env, obj, j_calls->" + fn_line.fn_name + "_meth" for idx, arg_info in enumerate(fn_line.args_ty): if arg_info.ret_conv is not None: @@ -1173,7 +1173,10 @@ import javax.annotation.Nullable; else: if arg.nullable: out_java_struct += "@Nullable " - out_java_struct += (arg.java_hu_ty + " " + arg.arg_name) + ty_string = arg.java_hu_ty + if arg.java_fn_ty_arg[0] == "L" and arg.java_fn_ty_arg[len(arg.java_fn_ty_arg) - 1] == ";": + ty_string = arg.java_fn_ty_arg.strip("L;").replace("/", ".") + out_java_struct += ty_string + " " + arg.arg_name out_java += (");\n") out_c += (") {\n") if out_java_struct is not None: