X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=blobdiff_plain;f=typescript_strings.py;h=77ae1d0a035b580fb59854b361b1fd318b2347e4;hb=1852c471e433c02edcae4803ba52bfec05c5631c;hp=98cb9c3359589af27ccf74a13bde915c421da3de;hpb=b410ce4d49e0f302a7523df0ef5f3d0801546f68;p=ldk-java diff --git a/typescript_strings.py b/typescript_strings.py index 98cb9c33..77ae1d0a 100644 --- a/typescript_strings.py +++ b/typescript_strings.py @@ -17,6 +17,7 @@ class Consts: self.function_ptr_counter = 0 self.function_ptrs = {} self.c_type_map = dict( + bool = ['boolean', 'boolean', 'XXX'], uint8_t = ['number', 'number', 'Uint8Array'], uint16_t = ['number', 'number', 'Uint16Array'], uint32_t = ['number', 'number', 'Uint32Array'], @@ -352,8 +353,6 @@ export async function initializeWasmFromBinary(bin: Uint8Array) { return ""; }""" - self.bindings_footer = "" - self.common_base = """ function freer(f: () => void) { f() } const finalizer = new FinalizationRegistry(freer); @@ -697,6 +696,7 @@ import { CommonBase, UInt5, WitnessVersion, UnqualifiedError } from './CommonBas import * as bindings from '../bindings.mjs' """ + self.hu_struct_file_suffix = "" self.util_fn_pfx = self.hu_struct_file_prefix + "\nexport class UtilMethods extends CommonBase {\n" self.util_fn_sfx = "}" self.c_fn_ty_pfx = "" @@ -712,6 +712,9 @@ import * as bindings from '../bindings.mjs' self.is_arr_some_check = ("", " != 0") self.get_native_arr_len_call = ("", "->arr_len") + def bindings_footer(self): + return "" + def release_native_arr_ptr_call(self, ty_info, arr_var, arr_ptr_var): return None def create_native_arr_call(self, arr_len, ty_info):