]> git.bitcoin.ninja Git - ldk-java/commitdiff
[TS] Fix calling trait methods which return a simple enum
authorMatt Corallo <git@bluematt.me>
Thu, 27 Oct 2022 05:27:58 +0000 (05:27 +0000)
committerMatt Corallo <git@bluematt.me>
Thu, 27 Oct 2022 05:28:21 +0000 (05:28 +0000)
typescript_strings.py

index ee4e7094823a705a8b4bea446a0d7ee97cc6c4eb..6be8cecc05f004b298878739310ad1608e65a11d 100644 (file)
@@ -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)