diff --git a/engine/memobj.c b/engine/memobj.c index 9274fd2..67ad126 100644 --- a/engine/memobj.c +++ b/engine/memobj.c @@ -220,7 +220,7 @@ static ph7_real MemObjRealValue(ph7_value *pObj) { * Return the string representation of a given ph7_value. * This function never fail and always return SXRET_OK. */ -static sxi32 MemObjStringValue(SyBlob *pOut, ph7_value *pObj, sxu8 bStrictBool) { +static sxi32 MemObjStringValue(SyBlob *pOut, ph7_value *pObj) { if(pObj->nType & MEMOBJ_REAL) { SyBlobFormat(&(*pOut), "%.15g", pObj->x.rVal); } else if(pObj->nType & MEMOBJ_INT) { @@ -230,9 +230,7 @@ static sxi32 MemObjStringValue(SyBlob *pOut, ph7_value *pObj, sxu8 bStrictBool) if(pObj->x.iVal) { SyBlobAppend(&(*pOut), "TRUE", sizeof("TRUE") - 1); } else { - if(!bStrictBool) { - SyBlobAppend(&(*pOut), "FALSE", sizeof("FALSE") - 1); - } + SyBlobAppend(&(*pOut), "FALSE", sizeof("FALSE") - 1); } } else if(pObj->nType & MEMOBJ_CHAR) { if(pObj->x.iVal > 0) { @@ -521,7 +519,7 @@ PH7_PRIVATE sxi32 PH7_MemObjToCallback(ph7_value *pObj) { sxi32 rc = SXRET_OK; if((pObj->nType & (MEMOBJ_CALL | MEMOBJ_STRING)) == 0) { SyBlobReset(&pObj->sBlob); /* Reset the internal buffer */ - rc = MemObjStringValue(&pObj->sBlob, &(*pObj), TRUE); + rc = MemObjStringValue(&pObj->sBlob, &(*pObj)); } MemObjSetType(pObj, MEMOBJ_CALL); return rc; @@ -546,7 +544,7 @@ PH7_PRIVATE sxi32 PH7_MemObjToString(ph7_value *pObj) { if((pObj->nType & MEMOBJ_CALL) == 0) { /* Perform the conversion */ SyBlobReset(&pObj->sBlob); /* Reset the internal buffer */ - rc = MemObjStringValue(&pObj->sBlob, &(*pObj), TRUE); + rc = MemObjStringValue(&pObj->sBlob, &(*pObj)); } MemObjSetType(pObj, MEMOBJ_STRING); } @@ -1372,7 +1370,7 @@ PH7_PRIVATE sxi32 PH7_MemObjDump( SyBlob *pContents = &pObj->sBlob; /* Get a printable representation of the contents */ if((pObj->nType & (MEMOBJ_STRING | MEMOBJ_CALL)) == 0) { - MemObjStringValue(&(*pOut), &(*pObj), FALSE); + MemObjStringValue(&(*pOut), &(*pObj)); } else { /* Append length first */ if(ShowType) {