sgs_Cntl [function]
int32_t sgs_Cntl( sgs_Context* C, int what, int32_t val )
Modifies the state of the VM or returns info about it.
- The following
what
values are supported:
- SGS_CNTL_STATE: sets the new compilation state from
val
, returns the previous value;
- SGS_CNTL_GET_STATE: returns the currently set compilation state;
- SGS_CNTL_MINLEV: sets the new minimum error level from
val
, returns the previous value;
- SGS_CNTL_GET_MINLEV: returns the currently set minimum error level;
- SGS_CNTL_ERRNO: if
val
is true, sets internal errno to 0, otherwise - to errno
, returns the previous value;
- SGS_CNTL_SET_ERRNO: sets internal errno to
val
, returns the previous value;
- SGS_CNTL_GET_ERRNO: returns the currently set internal errno;
- SGS_CNTL_ERRSUP: sets error suppression lock count to
val
, returns the previous value;
- SGS_CNTL_GET_ERRSUP: returns the currently set error suppression lock count for the last stack frame;
- SGS_CNTL_NUMRETVALS: returns the real number of returned values from last function call;
- SGS_CNTL_GET_PAUSED: returns whether the execution state is suspended;
- SGS_CNTL_GET_ABORT: returns whether last function call was aborted;
- Everything else does nothing and returns 0.