From 644f8256db9c7216cfc8a67ba6cb380a96ba28c5 Mon Sep 17 00:00:00 2001 From: bptato Date: Sat, 24 Jun 2023 16:41:13 +0200 Subject: Working Nim-QuickJS GC integration I believe this works correctly. Hopefully I'm not wrong. --- lib/quickjs/quickjs.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'lib/quickjs/quickjs.h') 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); -- cgit 1.4.1-2-gfad0