sq_writeclosure

Squirrel 2.2

sq_writeclosure

SQRESULT sq_writeclosure(HSQUIRRELVM v, SQWRITEFUNC writef, SQUserPointer up);

serialize(write) the closure on top of the stack, the desination is user defined through a write callback.

parameters:
HSQUIRRELVM v

the target VM

SQWRITEFUNC writef

pointer to a write function that will be invoked by the vm during the serialization.

SQUserPointer up

pointer that will be passed to each call to the write function

return:

a SQRESULT

remarks:

closures with free variables cannot be serialized