sq_weakref

Squirrel 2.2

sq_weakref

void sq_weakref(HSQUIRRELVM v, SQInteger idx);

pushes a weak reference to the object at position idx in the stack.

parameters:
HSQUIRRELVM v

the target VM

SQInteger idx

index to the target object in the stack

return:

a SQRESULT

remarks:

if the object at idx position is an integer,float,bool or null the object itself is pushed instead of a weak ref.