about summary refs log tree commit diff stats
path: root/src/bindings
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-04-30 18:59:19 +0200
committerbptato <nincsnevem662@gmail.com>2023-04-30 18:59:19 +0200
commit5db380ff789db24c6c48e2c513d9ca5ac7a606b3 (patch)
tree9296e1b88d48bf767df49cfbf08c43181da24b44 /src/bindings
parentc235e638788b43ca752179341e429f4d7e090870 (diff)
parenta02c408f933aea6f405ed3c64ab151b01b33ae9e (diff)
downloadchawan-5db380ff789db24c6c48e2c513d9ca5ac7a606b3.tar.gz
Merge branch 'wip_fetch'
Diffstat (limited to 'src/bindings')
-rw-r--r--src/bindings/quickjs.nim5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/bindings/quickjs.nim b/src/bindings/quickjs.nim
index 648abfb2..94b3c46e 100644
--- a/src/bindings/quickjs.nim
+++ b/src/bindings/quickjs.nim
@@ -264,6 +264,9 @@ const
   JS_GPN_ENUM_ONLY* = (1 shl 3)
   JS_GPN_SET_ENUM* = (1 shl 4)
 
+const
+  JS_PARSE_JSON_EXT* = (1 shl 0)
+
 template JS_CFUNC_DEF*(n: string, len: uint8, func1: JSCFunction): JSCFunctionListEntry = 
   JSCFunctionListEntry(name: cstring(n),
                        prop_flags: JS_PROP_WRITABLE or JS_PROP_CONFIGURABLE,
@@ -319,6 +322,8 @@ proc JS_NewPromiseCapability*(ctx: JSContext, resolving_funcs: ptr JSValue): JSV
 proc JS_SetOpaque*(obj: JSValue, opaque: pointer)
 proc JS_GetOpaque*(obj: JSValue, class_id: JSClassID): pointer
 proc JS_GetOpaque2*(ctx: JSContext, obj: JSValue, class_id: JSClassID): pointer
+proc JS_ParseJSON*(ctx: JSContext, buf: ptr char, buf_len: csize_t, filename: cstring): JSValue
+proc JS_ParseJSON2*(ctx: JSContext, buf: ptr char, buf_len: csize_t, filename: cstring, flags: cint): JSValue
 
 proc JS_NewClassID*(pclass_id: ptr JSClassID): JSClassID
 proc JS_NewClass*(rt: JSRuntime, class_id: JSClassID, class_def: ptr JSClassDef): cint