From: Matt Corallo Date: Thu, 27 Oct 2022 05:27:58 +0000 (+0000) Subject: [TS] Fix calling trait methods which return a simple enum X-Git-Tag: v0.0.112.0^2~11 X-Git-Url: http://git.bitcoin.ninja/?a=commitdiff_plain;h=7d1ea60152fae0604dda5416b7ce5c3f916fdfb9;p=ldk-java [TS] Fix calling trait methods which return a simple enum --- diff --git a/typescript_strings.py b/typescript_strings.py index ee4e7094..6be8cecc 100644 --- a/typescript_strings.py +++ b/typescript_strings.py @@ -1087,7 +1087,7 @@ export class {struct_name.replace("LDK","")} extends CommonBase {{ out_c = out_c + "\tjs_invoke_function_" + fn_suffix + "(j_calls->instance_ptr, " + str(self.function_ptr_counter) elif fn_line.ret_ty_info.java_hu_ty == "string": out_c += "\tjstring ret = (jstring)js_invoke_function_" + fn_suffix + "(j_calls->instance_ptr, " + str(self.function_ptr_counter) - elif not fn_line.ret_ty_info.passed_as_ptr: + elif fn_line.ret_ty_info.arg_conv is None: out_c += "\treturn js_invoke_function_" + fn_suffix + "(j_calls->instance_ptr, " + str(self.function_ptr_counter) else: out_c += "\tuint64_t ret = js_invoke_function_" + fn_suffix + "(j_calls->instance_ptr, " + str(self.function_ptr_counter)