projects
/
ldk-java
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
7b5efec
)
Add a warning for Locked human objects as they are not usable yet
author
Matt Corallo
<git@bluematt.me>
Sat, 8 Jan 2022 04:10:54 +0000
(
04:10
+0000)
committer
Matt Corallo
<git@bluematt.me>
Sat, 8 Jan 2022 04:16:38 +0000
(
04:16
+0000)
typescript_strings.py
patch
|
blob
|
history
diff --git
a/typescript_strings.py
b/typescript_strings.py
index 7022137f287b502c9ff14f5c3634e752f3766867..e995ab0c49d2832cc8872bcd03481328fcdad999 100644
(file)
--- 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 = ""
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", "")
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) {{
export class {hu_name} extends CommonBase {implementations}{{
/* @internal */
public constructor(_dummy: object, ptr: number) {{