projects
/
ldk-java
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Switch to the 0.0.100 branch on ldk-c-bindings
[ldk-java]
/
java_strings.py
diff --git
a/java_strings.py
b/java_strings.py
index ed9381c4f42646e6057634408244ae8d4512692f..2ddecab7539aed909fc8f544515f4ec3497e1a0a 100644
(file)
--- 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:
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 + "\t
uint64_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:
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 "
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:
out_java += (");\n")
out_c += (") {\n")
if out_java_struct is not None: