mirror of
https://github.com/VCMP-SqMod/SqMod.git
synced 2025-03-13 23:57:13 +01:00
Retrieve closure object from the stack.
This commit is contained in:
parent
185c51ef8f
commit
4500eb0a2c
@ -206,6 +206,7 @@ struct Function {
|
|||||||
return cenv; // Just stop knowing this is what we want
|
return cenv; // Just stop knowing this is what we want
|
||||||
// Is the callback is valid?
|
// Is the callback is valid?
|
||||||
} else if (ty2 & (_RT_CLOSURE | _RT_NATIVECLOSURE)) {
|
} else if (ty2 & (_RT_CLOSURE | _RT_NATIVECLOSURE)) {
|
||||||
|
if (SQ_FAILED(sq_getstackobj(vm, idx2, &mObj))) return false;
|
||||||
// Reference the environment and function
|
// Reference the environment and function
|
||||||
sq_addref(vm, &mEnv);
|
sq_addref(vm, &mEnv);
|
||||||
sq_addref(vm, &mObj);
|
sq_addref(vm, &mObj);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user