about summary refs log tree commit diff stats
path: root/lib/quickjs/quickjs.h
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 /lib/quickjs/quickjs.h
parentb10548ed6a1df090cdc7d139ba4ce531ebb1c7ea (diff)
downloadchawan-644f8256db9c7216cfc8a67ba6cb380a96ba28c5.tar.gz
Working Nim-QuickJS GC integration
I believe this works correctly. Hopefully I'm not wrong.
Diffstat (limited to 'lib/quickjs/quickjs.h')
-rw-r--r--lib/quickjs/quickjs.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/quickjs/quickjs.h b/lib/quickjs/quickjs.h
index 09085209..b05e510d 100644
--- a/lib/quickjs/quickjs.h
+++ b/lib/quickjs/quickjs.h
@@ -480,6 +480,7 @@ typedef void JSClassGCMark(JSRuntime *rt, JSValueConst val,
 typedef JSValue JSClassCall(JSContext *ctx, JSValueConst func_obj,
                             JSValueConst this_val, int argc, JSValueConst *argv,
                             int flags);
+typedef JS_BOOL JSClassCanDestroy(JSRuntime *rt, JSValueConst val);
 
 typedef struct JSClassDef {
     const char *class_name;
@@ -494,6 +495,7 @@ typedef struct JSClassDef {
     /* XXX: suppress this indirection ? It is here only to save memory
        because only a few classes need these methods */
     JSClassExoticMethods *exotic;
+    JSClassCanDestroy *can_destroy;
 } JSClassDef;
 
 JSClassID JS_NewClassID(JSClassID *pclass_id);