sq_newslot

Squirrel 2.2

sq_newslot

SQRESULT sq_newslot(HSQUIRRELVM v, SQInteger idx, SQBool bstatic);

pops a key and a value from the stack and performs a set operation on the table or class that is at position idx in the stack, if the slot does not exits it will be created.

parameters:
HSQUIRRELVM v

the target VM

SQInteger idx

index of the target table in the stack

SQBool bstatic

if SQTrue creates a static member. This parameter is only used if the target object is a class.

return:

a SQRESULT

remarks:

Invokes the _newslot metamethod in the table delegate. it only works on tables.