From: Matt Corallo Date: Sat, 8 Jan 2022 04:10:54 +0000 (+0000) Subject: Add a warning for Locked human objects as they are not usable yet X-Git-Tag: v0.0.104.1~1^2~1 X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=ca0aed596ddba4b859398743133c69db2c132644;p=ldk-java Add a warning for Locked human objects as they are not usable yet --- diff --git a/typescript_strings.py b/typescript_strings.py index 7022137f..e995ab0c 100644 --- a/typescript_strings.py +++ b/typescript_strings.py @@ -1014,12 +1014,12 @@ export class {struct_name.replace("LDK","")} extends CommonBase {{ def map_opaque_struct(self, struct_name, struct_doc_comment): implementations = "" method_header = "" - if struct_name.startswith("LDKLocked"): - return "NOT IMPLEMENTED" hu_name = struct_name.replace("LDKC2Tuple", "TwoTuple").replace("LDKC3Tuple", "ThreeTuple").replace("LDK", "") - out_opaque_struct_human = f"""{self.hu_struct_file_prefix} - + out_opaque_struct_human = f"{self.hu_struct_file_prefix}" + if struct_name.startswith("LDKLocked"): + out_opaque_struct_human += "/** XXX: DO NOT USE THIS - it remains locked until the GC runs (if that ever happens */" + out_opaque_struct_human += f""" export class {hu_name} extends CommonBase {implementations}{{ /* @internal */ public constructor(_dummy: object, ptr: number) {{