feat: add va_list version of wrenCall and fix GC bug with return values
- Introduce wrenCallVarArgs as an explicit va_list variant, allowing variadic functions to forward their arguments directly without re-parsing. - Fix a garbage collection issue in wrenCall where return values could be prematurely collected by ensuring proper root handling. - Refactor the call API test to avoid re-entering the VM by moving test execution into an afterLoad callback instead of a foreign method.
This commit is contained in:
@@ -27,11 +27,8 @@ class Api {
|
||||
// Otherwise print it.
|
||||
System.print(value)
|
||||
}
|
||||
|
||||
foreign static runTests()
|
||||
}
|
||||
|
||||
Api.runTests()
|
||||
// expect: noParams
|
||||
// expect: zero
|
||||
// expect: one 1
|
||||
|
||||
Reference in New Issue
Block a user