From 72dd71c1e608fcca7acfd067f73e4361da4336aa Mon Sep 17 00:00:00 2001 From: bptato Date: Thu, 20 Mar 2025 17:53:28 +0100 Subject: quickjs: remove JSValue comparison overload it doesn't really do what you would expect, better use JS_Is* functions (also, it broke 32-bit builds) --- lib/monoucha0/monoucha/quickjs.nim | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/monoucha0/monoucha/quickjs.nim b/lib/monoucha0/monoucha/quickjs.nim index 39ed7fab..31924112 100644 --- a/lib/monoucha0/monoucha/quickjs.nim +++ b/lib/monoucha0/monoucha/quickjs.nim @@ -62,8 +62,6 @@ when sizeof(int) < sizeof(int64): template JS_MKPTR*(t, p: untyped): JSValue = JSValue((cast[uint64](int64(t)) shl 32) or cast[uint](p)) - - proc `==`*(a, b: JSValueConst): bool {.borrow.} else: type JSValueUnion* {.importc, header: qjsheader, union.} = object @@ -285,6 +283,12 @@ type JS_PROMISE_FULFILLED JS_PROMISE_REJECTED +proc `==`*(a, b: JSValue): bool {.error.} = + discard + +proc `==`*(a, b: JSValueConst): bool {.error.} = + discard + func `==`*(a, b: JSAtom): bool {.borrow.} converter toJSValueConst*(val: JSValue): JSValueConst = -- cgit