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 f26095658d - Show all commits

View File

@ -315,6 +315,9 @@ static sxi32 MemObjBooleanValue(ph7_value *pObj) {
sxi32 iVal = 1; sxi32 iVal = 1;
sxi32 rc; sxi32 rc;
/* Invoke the __toBool() method if available [note that this is a symisc extension] */ /* Invoke the __toBool() method if available [note that this is a symisc extension] */
if(!pObj->x.pOther) {
return 0;
}
PH7_MemObjInit(pObj->pVm, &sResult); PH7_MemObjInit(pObj->pVm, &sResult);
rc = MemObjCallClassCastMethod(pObj->pVm, (ph7_class_instance *)pObj->x.pOther, rc = MemObjCallClassCastMethod(pObj->pVm, (ph7_class_instance *)pObj->x.pOther,
"__toBool", sizeof("__toBool") - 1, &sResult); "__toBool", sizeof("__toBool") - 1, &sResult);