diff options
| author | bptato <nincsnevem662@gmail.com> | 2025-03-20 17:53:28 +0100 |
|---|---|---|
| committer | bptato <nincsnevem662@gmail.com> | 2025-03-20 17:58:16 +0100 |
| commit | 72dd71c1e608fcca7acfd067f73e4361da4336aa (patch) | |
| tree | 8566fb0821ff4284cd051524d6ed9a43f5788df6 | |
| parent | 57940081167bde5c750672359c0ea4cbfabb8ea2 (diff) | |
| download | chawan-72dd71c1e608fcca7acfd067f73e4361da4336aa.tar.gz | |
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)
| -rw-r--r-- | lib/monoucha0/monoucha/quickjs.nim | 8 |
1 files 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 = |