diff options
author | bptato <nincsnevem662@gmail.com> | 2023-06-24 16:41:13 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2023-06-24 18:57:13 +0200 |
commit | 644f8256db9c7216cfc8a67ba6cb380a96ba28c5 (patch) | |
tree | 8fa210688fece9906a93cdee551f0df838deff19 /src/bindings | |
parent | b10548ed6a1df090cdc7d139ba4ce531ebb1c7ea (diff) | |
download | chawan-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.nim | 2 |
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 |