Typehinting merge #50

Merged
belliash merged 298 commits from typehinting into master 2019-04-17 11:27:52 +02:00
Showing only changes of commit d74b182235 - Show all commits

View File

@ -307,7 +307,17 @@ static sxi32 MemObjBooleanValue(ph7_value *pObj) {
} }
return zIn >= zEnd ? 0 : 1; return zIn >= zEnd ? 0 : 1;
} }
} else if(iFlags & (MEMOBJ_CALL | MEMOBJ_NULL | MEMOBJ_VOID)) { } else if(iFlags & MEMOBJ_CALL) {
SyString sString;
SyStringInitFromBuf(&sString, SyBlobData(&pObj->sBlob), SyBlobLength(&pObj->sBlob));
if(sString.nByte == 0) {
/* Empty string */
return 0;
} else {
/* Something set, return true */
return 1;
}
} else if(iFlags & (MEMOBJ_NULL | MEMOBJ_VOID)) {
return 0; return 0;
} else if(iFlags & MEMOBJ_HASHMAP) { } else if(iFlags & MEMOBJ_HASHMAP) {
ph7_hashmap *pMap = (ph7_hashmap *)pObj->x.pOther; ph7_hashmap *pMap = (ph7_hashmap *)pObj->x.pOther;