]> git.bitcoin.ninja Git - ldk-java/commitdiff
[TS] Correct TS call semantics for some function types
authorMatt Corallo <git@bluematt.me>
Sat, 1 Oct 2022 20:31:26 +0000 (20:31 +0000)
committerMatt Corallo <git@bluematt.me>
Mon, 3 Oct 2022 20:38:23 +0000 (20:38 +0000)
TS functions now all return uint64_t, not uint32_t, for pointers.

typescript_strings.py

index e5cf6132ed2be9c5b7ee4a572fdd590f3d392074..52dd12ce03bf0822023beb18390e429e2f0bd65a 100644 (file)
@@ -1082,7 +1082,7 @@ export class {struct_name.replace("LDK","")} extends CommonBase {{
                 elif not fn_line.ret_ty_info.passed_as_ptr:
                     out_c += "\treturn js_invoke_function_" + fn_suffix + "(j_calls->instance_ptr, " + str(self.function_ptr_counter)
                 else:
-                    out_c += "\tuint32_t ret = js_invoke_function_" + fn_suffix + "(j_calls->instance_ptr, " + str(self.function_ptr_counter)
+                    out_c += "\tuint64_t ret = js_invoke_function_" + fn_suffix + "(j_calls->instance_ptr, " + str(self.function_ptr_counter)
 
                 self.function_ptrs[self.function_ptr_counter] = (struct_name, fn_line.fn_name)
                 self.function_ptr_counter += 1