From bfd39abfb2f2c53184522f49833533df0b541370 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Tue, 20 Dec 2016 15:28:43 +0100 Subject: [PATCH] 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. --- include/evm.h | 23 +++++------------------ 1 file changed, 5 insertions(+), 18 deletions(-) diff --git a/include/evm.h b/include/evm.h index ad077e0..794698c 100644 --- a/include/evm.h +++ b/include/evm.h @@ -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. ///