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

This commit is contained in:
2018-12-20 18:30:21 +01:00
parent 2949c8dcfb
commit f97e2a8294
3 changed files with 36 additions and 7 deletions

View File

@@ -2283,6 +2283,19 @@ static sxi32 VmByteCodeExec(
PH7_MemObjToObject(pTos);
}
break;
/*
* CVT_CALL: * * *
*
* Force the top of the stack to be a callback
*/
case PH7_OP_CVT_CALL:
#ifdef UNTRUST
if(pTos < pStack) {
goto Abort;
}
#endif
PH7_MemObjToCallback(pTos);
break;
/*
* CVT_VOID: * * *
*