diff options
author | bptato <nincsnevem662@gmail.com> | 2024-01-17 13:52:11 +0100 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2024-01-17 13:52:11 +0100 |
commit | c20df592ada6f699389f62d57aae196b5580ed89 (patch) | |
tree | 1e2d77dafabdf6871a7fcf4c29eac70e83e882e6 /src/js/fromjs.nim | |
parent | 7c227f8160abfbde62437aedae1c144c257aacca (diff) | |
download | chawan-c20df592ada6f699389f62d57aae196b5580ed89.tar.gz |
js: small improvements
* turn JSFuncGenerator into a ref object (it's faster this way) * remove strformat dependency
Diffstat (limited to 'src/js/fromjs.nim')
-rw-r--r-- | src/js/fromjs.nim | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/js/fromjs.nim b/src/js/fromjs.nim index d7f34905..9de975f2 100644 --- a/src/js/fromjs.nim +++ b/src/js/fromjs.nim @@ -137,7 +137,9 @@ macro fromJSTupleBody(a: tuple) = defer: JS_FreeValue(ctx, doneVal) `done` = ?fromJS[bool](ctx, doneVal) if `done`: - JS_ThrowTypeError(ctx, "Too few arguments in sequence (got %d, expected %d)", `i`, `len`) + JS_ThrowTypeError(ctx, + "Too few arguments in sequence (got %d, expected %d)", cint(`i`), + cint(`len`)) return err() let valueVal = JS_GetProperty(ctx, next, ctx.getOpaque().str_refs[VALUE]) if JS_IsException(valueVal): |