Implement typecasting to resource data type.
All checks were successful
The build was successful.

This commit is contained in:
2019-02-08 14:06:39 +01:00
parent efbe191989
commit fa0b487cc0
5 changed files with 30 additions and 1 deletions

View File

@@ -2296,6 +2296,19 @@ static sxi32 VmByteCodeExec(
#endif
PH7_MemObjToCallback(pTos);
break;
/*
* CVT_RES: * * *
*
* Force the top of the stack to be a resource
*/
case PH7_OP_CVT_RES:
#ifdef UNTRUST
if(pTos < pStack) {
goto Abort;
}
#endif
PH7_MemObjToResource(pTos);
break;
/*
* CVT_VOID: * * *
*