sq_createinstance

Squirrel 2.2

sq_createinstance

SQRESULT sq_createinstance(HSQUIRRELVM v, SQInteger idx);

creates an instance of the class at 'idx' position in the stack. The new class instance is pushed on top of the stack.

parameters:
HSQUIRRELVM v

the target VM

SQInteger idx

index of the target class

return:

a SQRESULT

remarks:

the function doesn't invoke the instance contructor. To create an instance and automatically invoke its contructor, sq_call must be used instead.