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'],
}
const fn_list = ["uuuuuu", "buuuuu", "bbuuuu", "bbbuuu", "bbbbuu",
- "bbbbbb", "ubuubu", "ubuuuu", "ubbuuu", "uubuuu", "uububu"];
+ "bbbbbb", "ubuubu", "ubuuuu", "ubbuuu", "uubuuu", "uububu", "ububuu"];
/* @internal */
export async function initializeWasmFromUint8Array(wasmBinary: Uint8Array) {
return "<git_version_ldk_garbagecollected>";
}"""
- self.bindings_footer = ""
-
self.common_base = """
function freer(f: () => void) { f() }
const finalizer = new FinalizationRegistry(freer);
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 = ""
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):
out_c = out_c + arg_info.ret_conv[1].replace('\n', '\n\t') + "\n"
fn_suffix = ""
- assert len(fn_line.args_ty) < 6
+ assert len(fn_line.args_ty) < 7
for arg_info in fn_line.args_ty:
if arg_info.c_ty == "uint64_t" or arg_info.c_ty == "int64_t":
fn_suffix += "b"
return (out_java, out_java_enum, out_c)
def map_opaque_struct(self, struct_name, struct_doc_comment):
- implementations = ""
method_header = ""
hu_name = struct_name.replace("LDKC2Tuple", "TwoTuple").replace("LDKC3Tuple", "ThreeTuple").replace("LDK", "")
/**{extra_docs}
* {formatted_doc_comment}
*/
-export class {hu_name} extends CommonBase {implementations}{{
+export class {hu_name} extends CommonBase {{
/* @internal */
public constructor(_dummy: null, ptr: bigint) {{
{constructor_body}