sq_getuserdata

Squirrel 2.2

sq_getuserdata

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

gets a pointer to the value of the userdata at the idx position in the stack.

parameters:
HSQUIRRELVM v

the target VM

SQInteger idx

an index in the stack

SQUserPointer * p

A pointer to the userpointer that will point to the userdata's payload

SQUserPointer * typetag

A pointer to a SQUserPointer that will store the userdata tag(see sq_settypetag). The parameter can be NULL.

return:

a SQRESULT