openzeppelin-labs proxy contract
assembly {
let ptr := mload(0x40)
calldatacopy(ptr, 0, calldatasize)
let result := delegatecall(gas, _impl, ptr, calldatasize, 0, 0)
let size := returndatasize
returndatacopy(ptr, 0, size)
switch result
case 0 { revert(ptr, size) }
default { return(ptr, size) }
}
In the official documentation, I got this description.
call(g, a, v, in, insize, out, outsize), call contract at address a with input mem[in…(in+insize)) providing g gas and v wei and output area mem[out…(out+outsize)) returning 0 on error (eg. out of gas) and 1 on success
According to my understanding, the output content will be stored in the memory [out, out + outsize).
I am confused, if the last parameter is set to 0, when the method has a return value, whether it will work well.