about summary refs log tree commit diff stats
path: root/src/bindings
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2022-12-20 23:26:54 +0100
committerbptato <nincsnevem662@gmail.com>2022-12-20 23:26:54 +0100
commit7eee2e1f8c87232b13e68dc3ac398e8fd76ea5f9 (patch)
treeee6f6682bcfd6e6e0a5c70d5e341380cc4c54110 /src/bindings
parent18350159ad39c25d8acf6d9abdc4084592d58a21 (diff)
downloadchawan-7eee2e1f8c87232b13e68dc3ac398e8fd76ea5f9.tar.gz
pager: proxy values in container; js: bugfixes
Also, a little bonus: w3m keybindings
Diffstat (limited to 'src/bindings')
-rw-r--r--src/bindings/quickjs.nim4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/bindings/quickjs.nim b/src/bindings/quickjs.nim
index cfef9693..a606ede7 100644
--- a/src/bindings/quickjs.nim
+++ b/src/bindings/quickjs.nim
@@ -85,7 +85,8 @@ else:
 type
   JSRuntime* = ptr object
   JSContext* = ptr object
-  JSCFunction* = proc (ctx: JSContext, this_val: JSValue, argc: int, argv: ptr JSValue): JSValue {.cdecl.}
+  JSCFunction* = proc (ctx: JSContext, this_val: JSValue, argc: cint, argv: ptr JSValue): JSValue {.cdecl.}
+  JSCFunctionData* = proc (ctx: JSContext, this_val: JSValue, argc: cint, argv: ptr JSValue, magic: cint, func_data: ptr JSValue): JSValue {.cdecl.}
   JSGetterFunction* = proc(ctx: JSContext, this_val: JSValue): JSValue {.cdecl.}
   JSSetterFunction* = proc(ctx: JSContext, this_val: JSValue, val: JSValue): JSValue {.cdecl.}
   JSGetterMagicFunction* = proc(ctx: JSContext, this_val: JSValue, magic: cint): JSValue {.cdecl.}
@@ -339,6 +340,7 @@ proc JS_FreeAtom*(ctx: JSContext, atom: JSAtom)
 proc JS_FreeAtomRT*(rt: JSRuntime, atom: JSAtom)
 
 proc JS_NewCFunction2*(ctx: JSContext, cfunc: JSCFunction, name: cstring, length: cint, proto: JSCFunctionEnum, magic: cint): JSValue
+proc JS_NewCFunctionData*(ctx: JSContext, cfunc: JSCFunctionData, length: cint, magic: cint, data_len: cint, data: ptr JSValue): JSValue
 proc JS_NewCFunction*(ctx: JSContext, cfunc: JSCFunction, name: cstring, length: cint): JSValue
 
 proc JS_NewString*(ctx: JSContext, str: cstring): JSValue