From: Matt Corallo Date: Sat, 20 Mar 2021 20:32:52 +0000 (-0400) Subject: Disambiguate jcall function names by including the trait name X-Git-Tag: v0.0.98~7^2~8 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=8674ba961988bb6f9604829104f1defa7f386499;p=ldk-java Disambiguate jcall function names by including the trait name --- diff --git a/java_strings.py b/java_strings.py index 3f9ecc56..eed7f398 100644 --- a/java_strings.py +++ b/java_strings.py @@ -638,7 +638,7 @@ import java.util.Arrays; for idx, fn_line in enumerate(field_fns): if fn_line.fn_name != "free" and fn_line.fn_name != "clone": assert fn_line.ret_ty_info.ty_info.get_full_rust_ty()[1] == "" - out_c = out_c + fn_line.ret_ty_info.ty_info.get_full_rust_ty()[0] + " " + fn_line.fn_name + "_jcall(" + out_c = out_c + fn_line.ret_ty_info.ty_info.get_full_rust_ty()[0] + " " + fn_line.fn_name + "_" + struct_name + "_jcall(" if fn_line.self_is_const: out_c = out_c + "const void* this_arg" else: @@ -714,7 +714,7 @@ import java.util.Arrays; out_c = out_c + "\t\t.this_arg = (void*) calls,\n" for fn_line in field_fns: if fn_line.fn_name != "free" and fn_line.fn_name != "clone": - out_c = out_c + "\t\t." + fn_line.fn_name + " = " + fn_line.fn_name + "_jcall,\n" + out_c = out_c + "\t\t." + fn_line.fn_name + " = " + fn_line.fn_name + "_" + struct_name + "_jcall,\n" elif fn_line.fn_name == "free": out_c = out_c + "\t\t.free = " + struct_name + "_JCalls_free,\n" else: diff --git a/typescript_strings.py b/typescript_strings.py index a3c706ec..794f9ce1 100644 --- a/typescript_strings.py +++ b/typescript_strings.py @@ -673,7 +673,7 @@ const decodeString = (stringPointer, free = true) => { for idx, fn_line in enumerate(field_function_lines): if fn_line.fn_name != "free" and fn_line.fn_name != "clone": assert fn_line.ret_ty_info.ty_info.get_full_rust_ty()[1] == "" - out_c = out_c + fn_line.ret_ty_info.ty_info.get_full_rust_ty()[0] + " " + fn_line.fn_name + "_jcall(" + out_c = out_c + fn_line.ret_ty_info.ty_info.get_full_rust_ty()[0] + " " + fn_line.fn_name + "_" + struct_name + "_jcall(" if fn_line.self_is_const: out_c = out_c + "const void* this_arg" else: @@ -745,7 +745,7 @@ const decodeString = (stringPointer, free = true) => { out_c = out_c + "\t\t.this_arg = (void*) calls,\n" for fn_line in field_function_lines: if fn_line.fn_name != "free" and fn_line.fn_name != "clone": - out_c = out_c + "\t\t." + fn_line.fn_name + " = " + fn_line.fn_name + "_jcall,\n" + out_c = out_c + "\t\t." + fn_line.fn_name + " = " + fn_line.fn_name + "_" + struct_name + "_jcall,\n" elif fn_line.fn_name == "free": out_c = out_c + "\t\t.free = " + struct_name + "_JCalls_free,\n" else: