projects
/
ldk-java
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
de03148
)
re-fix whitespace bugs
author
Matt Corallo
<git@bluematt.me>
Wed, 27 Jan 2021 23:13:42 +0000
(18:13 -0500)
committer
Matt Corallo
<git@bluematt.me>
Wed, 27 Jan 2021 23:13:42 +0000
(18:13 -0500)
typescript_strings.py
patch
|
blob
|
history
diff --git
a/typescript_strings.py
b/typescript_strings.py
index 5e008a736ce5da66d1119602c8bc6264840db1d4..a8e9acdc204a84c778eafa276892500f574ecf56 100644
(file)
--- a/
typescript_strings.py
+++ b/
typescript_strings.py
@@
-238,7
+238,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.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
"
self.result_c_ty = "uint32_t"
self.owned_str_to_c_call = ("conv_owned_string(", ")")
self.ptr_arr = "ptrArray"
self.result_c_ty = "uint32_t"
self.owned_str_to_c_call = ("conv_owned_string(", ")")
self.ptr_arr = "ptrArray"
@@
-905,14
+905,13
@@
const decodeString = (stringPointer, free = true) => {
return_statement = f"return {converter}(nativeResponseValue);"
out_java = f"""\texport function {method_name}({method_argument_string}): {return_type_info.java_ty} {{
return_statement = f"return {converter}(nativeResponseValue);"
out_java = f"""\texport function {method_name}({method_argument_string}): {return_type_info.java_ty} {{
- if(!isWasmInitialized){{
- throw new Error("initializeWasm() must be awaited first!");
- }}
- const nativeResponseValue = wasm.{method_name}({native_call_argument_string});
- {return_statement}\n\t}}
- \n"""
-
-
+ if(!isWasmInitialized) {{
+ throw new Error("initializeWasm() must be awaited first!");
+ }}
+ const nativeResponseValue = wasm.{method_name}({native_call_argument_string});
+ {return_statement}
+ }}
+"""
if has_out_java_struct:
out_java_struct = ""
if has_out_java_struct:
out_java_struct = ""