Add VM SAPI configuration option and restrict console module to the CLI SAPI
Build / AerScript (push) Successful in 12s
Build / AerScript (push) Successful in 12s
This commit is contained in:
@@ -257,6 +257,7 @@ struct SyMutexMethods {
|
||||
#define PH7_LOOKED SXERR_LOCKED /* Forbidden Operation */
|
||||
#define PH7_COMPILE_ERR (-70) /* Compilation error */
|
||||
#define PH7_VM_ERR (-71) /* Virtual machine error */
|
||||
#define PH7_MODULE_SAPI_DENIED 1 /* Returned by initializeModule: module not available for the current SAPI */
|
||||
/* end-of-error-codes */
|
||||
/*
|
||||
* If compiling for a processor that lacks floating point
|
||||
@@ -318,6 +319,7 @@ typedef sxi64 ph7_int64;
|
||||
#define PH7_VM_CONFIG_IO_STREAM 15 /* ONE ARGUMENT: const ph7_io_stream *pStream */
|
||||
#define PH7_VM_CONFIG_ARGV_ENTRY 16 /* ONE ARGUMENT: const char *zValue */
|
||||
#define PH7_VM_CONFIG_EXTRACT_OUTPUT 17 /* TWO ARGUMENTS: const void **ppOut,unsigned int *pOutputLen */
|
||||
#define PH7_VM_CONFIG_SAPI 18 /* ONE ARGUMENT: const char *zSapi [a-z0-9-]; set only before the VM is prepared */
|
||||
/*
|
||||
* Global Library Configuration Commands.
|
||||
*
|
||||
|
||||
@@ -1270,6 +1270,8 @@ struct ph7_vm {
|
||||
sxbool bInit; /* Unpublished bootstrap: errors return to bulk cleanup */
|
||||
sxi32 iInitError; /* Sticky bootstrap compiler failure */
|
||||
sxbool bErrReport; /* TRUE to report all runtime Error/Warning/Notice/Deprecated */
|
||||
char *zSapi; /* VM-owned copy of the SAPI name (NULL means default "cli") */
|
||||
sxbool bReady; /* TRUE once PH7_VmMakeReady() completed; no further VM configuration */
|
||||
SySet *pClassJournal; /* Non-reentrant, callback-free metadata preparation */
|
||||
ph7_class *pStagedClass; /* Unpublished declaration visible only to preparation */
|
||||
sxi32 bClassDeferred; /* A forward hierarchy name is not installed yet */
|
||||
@@ -1804,6 +1806,8 @@ PH7_PRIVATE void PH7_VmExpandConstantValue(ph7_value *pVal, void *pUserData);
|
||||
PH7_PRIVATE sxi32 VmExtractDebugTrace(ph7_vm *pVm, SySet *pDebugTrace);
|
||||
PH7_PRIVATE sxi32 PH7_VmDump(ph7_vm *pVm, ProcConsumer xConsumer, void *pUserData);
|
||||
PH7_PRIVATE sxi32 PH7_VmInit(ph7_vm *pVm, ph7 *pEngine, sxbool bDebug);
|
||||
PH7_PRIVATE const char *PH7_VmSapiName(ph7_vm *pVm);
|
||||
PH7_PRIVATE int PH7_VmSapiIs(ph7_vm *pVm, const char *zSapi);
|
||||
PH7_PRIVATE sxi32 PH7_VmConfigure(ph7_vm *pVm, sxi32 nOp, va_list ap);
|
||||
PH7_PRIVATE sxi32 PH7_VmByteCodeExec(ph7_vm *pVm);
|
||||
PH7_PRIVATE sxi32 PH7_VmRelease(ph7_vm *pVm);
|
||||
|
||||
Reference in New Issue
Block a user