sq_compilebuffer |
SQRESULT sq_compilebuffer(
HSQUIRRELVM v, const SQChar* s, SQInteger size, const SQChar * sourcename, SQBool raiseerror)
;
compiles a squirrel program from a memory buffer; if it succeeds, push the compiled script as function in the stack.
- parameters:
-
- HSQUIRRELVM v
-
the target VM
- const SQChar* s
-
a pointer to the buffer that has to be compiled.
- SQInteger size
-
size in characters of the buffer passed in the parameter 's'.
- const SQChar * sourcename
-
the symbolic name of the program (used only for more meaningful runtime errors)
- SQBool raiseerror
-
if this value true the compiler error handler will be called in case of an error
- return:
-
a SQRESULT. If the sq_compilebuffer fails nothing is pushed in the stack.
- remarks:
-
in case of an error the function will call the function set by sq_setcompilererrorhandler().