Unify compiler OOM error messages.
The build was successful. Details

This commit is contained in:
Rafal Kupiec 2019-04-24 23:52:48 +02:00
parent 1c5982e764
commit cb455c3c73
Signed by: belliash
GPG Key ID: 4E829243E0CFE6B4
1 changed files with 2 additions and 2 deletions

View File

@ -2236,7 +2236,7 @@ static sxi32 PH7_CompileVar(ph7_gen_state *pGen) {
/* Duplicate variable name */ /* Duplicate variable name */
zDup = SyMemBackendStrDup(&pGen->pVm->sAllocator, pName->zString, pName->nByte); zDup = SyMemBackendStrDup(&pGen->pVm->sAllocator, pName->zString, pName->nByte);
if(zDup == 0) { if(zDup == 0) {
PH7_GenCompileError(&(*pGen), E_ERROR, nLine, "Fatal, PH7 engine is running out of memory"); PH7_GenCompileError(&(*pGen), E_ERROR, nLine, "PH7 engine is running out-of-memory");
} }
SyStringInitFromBuf(&sStatic.sName, zDup, pName->nByte); SyStringInitFromBuf(&sStatic.sName, zDup, pName->nByte);
/* Check if we have an expression to compile */ /* Check if we have an expression to compile */
@ -2263,7 +2263,7 @@ static sxi32 PH7_CompileVar(ph7_gen_state *pGen) {
} else { } else {
zDup = SyMemBackendStrDup(&pGen->pVm->sAllocator, pName->zString, pName->nByte); zDup = SyMemBackendStrDup(&pGen->pVm->sAllocator, pName->zString, pName->nByte);
if(zDup == 0) { if(zDup == 0) {
PH7_GenCompileError(&(*pGen), E_ERROR, nLine, "Fatal, PH7 engine is running out of memory"); PH7_GenCompileError(&(*pGen), E_ERROR, nLine, "PH7 engine is running out-of-memory");
} }
void *p3 = (void *) zDup; void *p3 = (void *) zDup;
/* Emit OP_DECLARE instruction */ /* Emit OP_DECLARE instruction */