EVM-C: Drop address field from evm_result

The evm_result was planned to be used as the return struct of the call callback. The address was added to support CREATE, but it is never used and the union here confuses many languages like Go and Python.
This commit is contained in:
Paweł Bylica 2016-12-20 15:28:43 +01:00
parent 5967bf4707
commit bfd39abfb2
1 changed files with 5 additions and 18 deletions

View File

@ -77,25 +77,12 @@ struct evm_result {
/// The value is valid only if evm_result::code == ::EVM_SUCCESS.
int64_t gas_left;
union
{
struct
{
/// The reference to output data. The memory containing the output
/// data is owned by EVM and is freed with evm_result::release().
uint8_t const* output_data;
/// The reference to output data. The memory containing the output
/// data is owned by EVM and is freed with evm_result::release().
uint8_t const* output_data;
/// The size of the output data.
size_t output_size;
};
/// The address of the successfully created contract.
///
/// This field has valid value only if the evm_result comes from a
/// successful CREATE opcode execution
/// (i.e. evm_call_fn(..., EVM_CREATE, ...)).
struct evm_uint160be create_address;
};
/// The size of the output data.
size_t output_size;
/// The pointer to the result release implementation.
///