From: Arik Sosman Date: Tue, 19 Jan 2021 23:16:58 +0000 (-0800) Subject: fix pointer types in Typescript X-Git-Tag: v0.0.1~41 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=74dbe11368db19528436facc532edef09b13ac52;p=ldk-java fix pointer types in Typescript --- diff --git a/gen_type_mapping.py b/gen_type_mapping.py index d78057b6..7eda9b7c 100644 --- a/gen_type_mapping.py +++ b/gen_type_mapping.py @@ -17,7 +17,8 @@ class TypeMappingGenerator: def map_type(self, fn_arg, print_void, ret_arr_len, is_free, holds_ref): ty_info = self.java_c_types(fn_arg, ret_arr_len) - return self.map_type_with_info(ty_info, print_void, ret_arr_len, is_free, holds_ref) + mapped_info = self.map_type_with_info(ty_info, print_void, ret_arr_len, is_free, holds_ref) + return mapped_info def map_type_with_info(self, ty_info, print_void, ret_arr_len, is_free, holds_ref): if ty_info.c_ty == "void": diff --git a/typescript_strings.py b/typescript_strings.py index cbde654d..6e2ce6fa 100644 --- a/typescript_strings.py +++ b/typescript_strings.py @@ -214,7 +214,7 @@ import * as bindings from '../bindings' // TODO: figure out location self.c_fn_args_pfx = "void* ctx_TODO" self.file_ext = ".ts" self.ptr_c_ty = "uint32_t" - self.ptr_native_ty = "uint32_t" + self.ptr_native_ty = "number" # "uint32_t" self.result_c_ty = "uint32_t" self.ptr_arr = "uint32_tArray" self.get_native_arr_len_call = ("", ".len")