Make native class registration use const templates with stack copies, tighten System argument validation and drop unused json_rc
Build / AerScript (push) Successful in 45s
Build / AerScript (push) Successful in 45s
This commit is contained in:
+4
-4
@@ -2510,8 +2510,6 @@ PH7_PRIVATE sxi32 PH7_VmInit(
|
||||
PH7_MemObjInit(pVm, &pVm->sPendingTransfer);
|
||||
/* Default assertion flags */
|
||||
pVm->iAssertFlags = PH7_ASSERT_WARNING; /* Issue a warning for each failed assertion */
|
||||
/* JSON return status */
|
||||
pVm->json_rc = JSON_ERROR_NONE;
|
||||
/* PRNG context */
|
||||
SyRandomnessInit(&pVm->sPrng, 0, 0);
|
||||
/* Install the null constant */
|
||||
@@ -2711,7 +2709,9 @@ PH7_PRIVATE sxi32 PH7_VmMakeReady(
|
||||
/* Zero the reference table */
|
||||
SyZero(pVm->apRefObj, sizeof(VmRefObj *) * pVm->nRefSize);
|
||||
}
|
||||
/* Register special functions first [i.e: print, json_encode(), func_get_args(), etc.] */
|
||||
/* Register special functions first [i.e: module_loaded(), function_exists(),
|
||||
* class_exists(), get_class(), rand(), var_dump(), print_r(), get_include_path(),
|
||||
* debug_backtrace(), ...] */
|
||||
rc = VmRegisterSpecialFunction(&(*pVm));
|
||||
if(rc != SXRET_OK) {
|
||||
/* Don't worry about freeing memory, everything will be released shortly */
|
||||
@@ -3670,7 +3670,7 @@ PH7_PRIVATE sxi32 PH7_VmConfigure(
|
||||
n = (sxu32)SyStrlen(zValue);
|
||||
nText = SyBlobLength(&pVm->sArgv);
|
||||
nEntries = SyBlobLength(&pVm->sArgvEntries);
|
||||
/* Keep exact entries separately from getopt's legacy flat text. */
|
||||
/* Keep exact argument entries separately from the flat $argv text. */
|
||||
rc = SyBlobAppend(&pVm->sArgvEntries, zValue, n + 1);
|
||||
if(rc == SXRET_OK && n > 0) {
|
||||
if(nText > 0) {
|
||||
|
||||
Reference in New Issue
Block a user