about summary refs log tree commit diff stats
path: root/src/js/fromjs.nim
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-05-09 20:03:30 +0200
committerbptato <nincsnevem662@gmail.com>2024-05-09 20:03:30 +0200
commit711574bde581af1a1bfdeb71ffe9f8594c60e969 (patch)
tree00fd150569444cddc6722cca55892efb97b5a579 /src/js/fromjs.nim
parent0ecdc3fcb376b62756c74c1e667002a5022863be (diff)
downloadchawan-711574bde581af1a1bfdeb71ffe9f8594c60e969.tar.gz
fromjs: remove broken uint64 converter
It would silently truncate the upper 32 bits... not a very bright idea.
Diffstat (limited to 'src/js/fromjs.nim')
-rw-r--r--src/js/fromjs.nim5
1 files changed, 0 insertions, 5 deletions
diff --git a/src/js/fromjs.nim b/src/js/fromjs.nim
index 7a8a0859..ccf8abcb 100644
--- a/src/js/fromjs.nim
+++ b/src/js/fromjs.nim
@@ -98,11 +98,6 @@ func fromJSInt[T: SomeInteger](ctx: JSContext; val: JSValue):
     if JS_ToUint32(ctx, addr ret, val) < 0:
       return err()
     return ok(ret)
-  elif T is uint64:
-    var ret: uint32
-    if JS_ToUint32(ctx, addr ret, val) < 0:
-      return err()
-    return ok(uint64(ret))
 
 proc fromJSFloat64(ctx: JSContext; val: JSValue): JSResult[float64] =
   var f64: float64