]> git.bitcoin.ninja Git - ldk-java/commitdiff
fix pointer types in Typescript
authorArik Sosman <git@arik.io>
Tue, 19 Jan 2021 23:16:58 +0000 (15:16 -0800)
committerArik Sosman <git@arik.io>
Tue, 19 Jan 2021 23:16:58 +0000 (15:16 -0800)
gen_type_mapping.py
typescript_strings.py

index d78057b6a3a29acba9b18c57ead2ba7cba5b1ff1..7eda9b7ca01c04f34ecb9792a4224e6d6ce82fc3 100644 (file)
@@ -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":
index cbde654d453ae302847e8018fde36d1dbfebfc88..6e2ce6fa3bea22e77394852fffcaf91e4b4808dd 100644 (file)
@@ -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")