sq_getinstanceup

Squirrel 2.2

sq_getinstanceup

SQRESULT sq_getinstanceup(HSQUIRRELVM v, SQInteger idx, SQUserPointer * up, SQUSerPointer typetag);

gets the userpointer of the class instance at position idx in the stack. if the parameter 'typetag' is different than 0, the function checks that the class or a base class of the instance is tagged with the specified tag; if not the function fails. If 'typetag' is 0 the function will ignore the tag check.

parameters:
HSQUIRRELVM v

the target VM

SQInteger idx

an index in the stack

SQUserPointer * up

a pointer to the userpointer that will store the result

SQUSerPointer typetag

the typetag that has to be checked, if this value is set to 0 the typetag is ignored.

return:

a SQRESULT