From c20df592ada6f699389f62d57aae196b5580ed89 Mon Sep 17 00:00:00 2001 From: bptato Date: Wed, 17 Jan 2024 13:52:11 +0100 Subject: js: small improvements * turn JSFuncGenerator into a ref object (it's faster this way) * remove strformat dependency --- src/js/fromjs.nim | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/js/fromjs.nim') 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): -- cgit 1.4.1-2-gfad0