about summary refs log tree commit diff stats
path: root/src/bindings
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2023-06-24 16:41:13 +0200
committerbptato <nincsnevem662@gmail.com>2023-06-24 18:57:13 +0200
commit644f8256db9c7216cfc8a67ba6cb380a96ba28c5 (patch)
tree8fa210688fece9906a93cdee551f0df838deff19 /src/bindings
parentb10548ed6a1df090cdc7d139ba4ce531ebb1c7ea (diff)
downloadchawan-644f8256db9c7216cfc8a67ba6cb380a96ba28c5.tar.gz
Working Nim-QuickJS GC integration
I believe this works correctly. Hopefully I'm not wrong.
Diffstat (limited to 'src/bindings')
-rw-r--r--src/bindings/quickjs.nim2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/bindings/quickjs.nim b/src/bindings/quickjs.nim
index 7160ce07..b49ed1cf 100644
--- a/src/bindings/quickjs.nim
+++ b/src/bindings/quickjs.nim
@@ -83,6 +83,7 @@ type
   JSClassID* = uint32
   JSAtom* = uint32
   JSClassFinalizer* = proc (rt: JSRuntime, val: JSValue) {.cdecl.}
+  JSClassCheckDestroy* = proc (rt: JSRuntime, val: JSValue): JS_BOOL {.cdecl.}
   JSClassGCMark* = proc (rt: JSRuntime, val: JSValue, mark_func: JS_MarkFunc) {.cdecl.}
   JS_MarkFunc* = proc (rt: JSRuntime, gp: ptr JSGCObjectHeader) {.cdecl.}
   JSModuleNormalizeFunc* = proc(ctx: JSContext, module_base_name,
@@ -122,6 +123,7 @@ type
     gc_mark*: JSClassGCMark
     call*: pointer
     exotic*: JSClassExoticMethodsConst
+    can_destroy*: JSClassCheckDestroy
 
   JSClassDefConst* {.importc: "const JSClassDef *", header: qjsheader.} = ptr JSClassDef