diff options
author | bptato <nincsnevem662@gmail.com> | 2024-05-30 17:36:53 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2024-05-30 17:40:21 +0200 |
commit | 29cf3549a62878cc1315da5cf3e93891173e2d4d (patch) | |
tree | 3b74bd8fb5643d3cf09053546192fec94cdc987c /src/bindings | |
parent | b4cbdb8e1eb8af2a55d6a5b22316d59c87612578 (diff) | |
download | chawan-29cf3549a62878cc1315da5cf3e93891173e2d4d.tar.gz |
Fix GCC 14 compilation
TODO: find the exact flags we need instead of -fpermissive. See also: https://todo.sr.ht/~bptato/chawan/12 https://forum.nim-lang.org/t/11587
Diffstat (limited to 'src/bindings')
-rw-r--r-- | src/bindings/quickjs.nim | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/bindings/quickjs.nim b/src/bindings/quickjs.nim index 06d8087f..836bedac 100644 --- a/src/bindings/quickjs.nim +++ b/src/bindings/quickjs.nim @@ -233,6 +233,8 @@ type {.cdecl.} js_malloc_usable_size*: proc(p: pointer) {.cdecl.} +func `==`*(a, b: JSAtom): bool {.borrow.} + converter toBool*(js: JS_BOOL): bool {.inline.} = cast[cint](js) != 0 @@ -412,6 +414,8 @@ proc JS_NewBigInt64*(ctx: JSContext; val: int64): JSValue proc JS_NewBigUInt64*(ctx: JSContext; val: uint64): JSValue proc JS_NewFloat64*(ctx: JSContext; val: cdouble): JSValue +const JS_ATOM_NULL* = JSAtom(0) + proc JS_NewAtomLen*(ctx: JSContext; str: cstring; len: csize_t): JSAtom proc JS_NewAtomUInt32*(ctx: JSContext; u: uint32): JSAtom proc JS_ValueToAtom*(ctx: JSContext; val: JSValue): JSAtom @@ -468,8 +472,6 @@ proc JS_DefinePropertyValue*(ctx: JSContext; this_obj: JSValue; prop: JSAtom; val: JSValue; flags: cint): cint proc JS_DefinePropertyValueUint32*(ctx: JSContext; this_obj: JSValue; idx: uint32; val: JSValue; flags: cint): cint -proc JS_DefinePropertyValueInt64*(ctx: JSContext; this_obj: JSValue; idx: int64; - val: JSValue; flags: cint): cint proc JS_DefinePropertyValueStr*(ctx: JSContext; this_obj: JSValue; prop: cstring; val: JSValue; flags: cint): cint proc JS_DefinePropertyValueGetSet*(ctx: JSContext; this_obj: JSValue; |