sq_gettypetag

Squirrel 2.2

sq_gettypetag

SQRESULT sq_gettypetag(HSQUIRRELVM v, SQInteger idx, SQUserPointer * typetag);

gets the typetag of the object(userdata or class) at position idx in the stack.

parameters:
HSQUIRRELVM v

the target VM

SQInteger idx

an index in the stack

SQUserPointer * typetag

a pointer to the variable that will store the tag

return:

a SQRESULT

remarks:

the function works also with instances. if the taget object is an instance, the typetag of it's base class is fetched.