feat: add WrenValue handle API for persistent object references outside VM

Introduce WrenValue type and wrenGetArgumentValue/wrenReleaseValue functions to allow C code to hold GC-safe references to Wren objects across foreign calls. Implement doubly-linked list management in VM struct, mark value handles during garbage collection, and add assertion in wrenFreeVM to detect unreleased values. Update test infrastructure with new get_value test case and rename existing test binding functions to camelCase convention.
This commit is contained in:
Bob Nystrom
2015-08-07 05:24:15 +00:00
parent 8468ca7642
commit 592772a97d
13 changed files with 167 additions and 22 deletions
+3
View File
@@ -0,0 +1,3 @@
#include "wren.h"
WrenForeignMethodFn getValueBindForeign(const char* signature);