sq_getfreevariable |
const SQChar * sq_getfreevariable(
HSQUIRRELVM v, SQInteger idx, SQInteger nval)
;
gets the value of the free variable of the closure at the position idx in the stack.
- parameters:
-
- HSQUIRRELVM v
-
the target VM
- SQInteger idx
-
index of the target object in the stack(closure)
- SQInteger nval
-
0 based index of the free variable(relative to the closure).
- return:
-
the name of the free variable for pure squirrel closures. NULL in case of error or if the index of the variable is out of range.
- remarks:
-
The function will always fail with C native closures.