diff options
author | bptato <nincsnevem662@gmail.com> | 2023-12-28 21:19:21 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2023-12-28 21:23:26 +0100 |
commit | d91d1dda2ad1219b3b798eafc14151811ed9a1b3 (patch) | |
tree | f82d8da0763f0dbc62dedb2aa9aaa51114d2aad9 /src/js | |
parent | b035e53d641d71fab89f92cd8d5188501be0d058 (diff) | |
download | chawan-d91d1dda2ad1219b3b798eafc14151811ed9a1b3.tar.gz |
Compile with styleCheck:usages
much better
Diffstat (limited to 'src/js')
-rw-r--r-- | src/js/fromjs.nim | 2 | ||||
-rw-r--r-- | src/js/javascript.nim | 2 | ||||
-rw-r--r-- | src/js/module.nim | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/src/js/fromjs.nim b/src/js/fromjs.nim index bddaa2e1..2ffdb9e2 100644 --- a/src/js/fromjs.nim +++ b/src/js/fromjs.nim @@ -226,7 +226,7 @@ proc fromJSSeq[T](ctx: JSContext, val: JSValue): JSResult[seq[T]] = return err() defer: JS_FreeValue(ctx, valueVal) let genericRes = fromJS[typeof(s[0])](ctx, valueVal) - if genericRes.isnone: # exception + if genericRes.isNone: # exception return err() s.add(genericRes.get) return ok(s) diff --git a/src/js/javascript.nim b/src/js/javascript.nim index 73fd5850..ac438e1b 100644 --- a/src/js/javascript.nim +++ b/src/js/javascript.nim @@ -103,7 +103,7 @@ type PROPERTY_NAMES = "js_prop_names" FINALIZER = "js_fin" -var runtimes {.threadVar.}: seq[JSRuntime] +var runtimes {.threadvar.}: seq[JSRuntime] proc newJSRuntime*(): JSRuntime = let rt = JS_NewRuntime() diff --git a/src/js/module.nim b/src/js/module.nim index 70755ebd..fe080f13 100644 --- a/src/js/module.nim +++ b/src/js/module.nim @@ -4,7 +4,7 @@ import js/javascript import js/tojs proc setImportMeta(ctx: JSContext, funcVal: JSValue, isMain: bool) = - let m = cast[JSModuleDef](JS_VALUE_GET_PTR(func_val)) + let m = cast[JSModuleDef](JS_VALUE_GET_PTR(funcVal)) let moduleNameAtom = JS_GetModuleName(ctx, m) let moduleName = JS_AtomToCString(ctx, moduleNameAtom) let metaObj = JS_GetImportMeta(ctx, m) |