Distinguish methods from attributes.
The build was successful.
Details
The build was successful.
Details
This commit is contained in:
parent
d3d3dff673
commit
5e7d5957e2
11
engine/vm.c
11
engine/vm.c
|
@ -4593,14 +4593,9 @@ static sxi32 VmByteCodeExec(
|
||||||
/* Check if the call is allowed */
|
/* Check if the call is allowed */
|
||||||
pMeth = PH7_ClassExtractMethod(pSelf, pVmFunc->sName.zString, pVmFunc->sName.nByte);
|
pMeth = PH7_ClassExtractMethod(pSelf, pVmFunc->sName.zString, pVmFunc->sName.nByte);
|
||||||
if(pMeth && pMeth->iProtection != PH7_CLASS_PROT_PUBLIC) {
|
if(pMeth && pMeth->iProtection != PH7_CLASS_PROT_PUBLIC) {
|
||||||
if(!VmClassMemberAccess(&(*pVm), pSelf, &pVmFunc->sName, pMeth->iProtection, TRUE)) {
|
if(!VmClassMemberAccess(&(*pVm), pSelf, &pVmFunc->sName, pMeth->iProtection, FALSE)) {
|
||||||
/* Pop given arguments */
|
PH7_VmThrowError(&(*pVm), PH7_CTX_ERR,
|
||||||
if(pInstr->iP1 > 0) {
|
"Access to the class method '%z->%z()' is forbidden", &pSelf->sName, &pVmFunc->sName);
|
||||||
VmPopOperand(&pTos, pInstr->iP1);
|
|
||||||
}
|
|
||||||
/* Assume a null return value so that the program continue it's execution normally */
|
|
||||||
PH7_MemObjRelease(pTos);
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue