Skip to content

Commit c982f26

Browse files
authored
Merge pull request #673 from ethereum/result
Add wording about output_data in case of output_size=0
2 parents 1378b6f + 9f3456b commit c982f26

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

include/evmc/evmc.h

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -412,20 +412,21 @@ struct evmc_result
412412
/**
413413
* The reference to output data.
414414
*
415-
* The output contains data coming from RETURN opcode (iff evmc_result::code
416-
* field is ::EVMC_SUCCESS) or from REVERT opcode.
415+
* The output contains data coming from RETURN opcode (iff evmc_result::code
416+
* field is ::EVMC_SUCCESS) or from REVERT opcode.
417417
*
418-
* The memory containing the output data is owned by EVM and has to be
419-
* freed with evmc_result::release().
418+
* The memory containing the output data is owned by EVM and has to be
419+
* freed with evmc_result::release().
420420
*
421-
* This MAY be NULL.
421+
* This pointer MAY be NULL.
422+
* If evmc_result::output_size is 0 this pointer MUST NOT be dereferenced.
422423
*/
423424
const uint8_t* output_data;
424425

425426
/**
426427
* The size of the output data.
427428
*
428-
* If output_data is NULL this MUST be 0.
429+
* If evmc_result::output_data is NULL this MUST be 0.
429430
*/
430431
size_t output_size;
431432

@@ -463,13 +464,13 @@ struct evmc_result
463464
/**
464465
* Reserved data that MAY be used by a evmc_result object creator.
465466
*
466-
* This reserved 4 bytes together with 20 bytes from create_address form
467-
* 24 bytes of memory called "optional data" within evmc_result struct
468-
* to be optionally used by the evmc_result object creator.
467+
* This reserved 4 bytes together with 20 bytes from create_address form
468+
* 24 bytes of memory called "optional data" within evmc_result struct
469+
* to be optionally used by the evmc_result object creator.
469470
*
470-
* @see evmc_result_optional_data, evmc_get_optional_data().
471+
* @see evmc_result_optional_data, evmc_get_optional_data().
471472
*
472-
* Also extends the size of the evmc_result to 64 bytes (full cache line).
473+
* Also extends the size of the evmc_result to 64 bytes (full cache line).
473474
*/
474475
uint8_t padding[4];
475476
};
@@ -1111,7 +1112,7 @@ struct evmc_vm
11111112
/**
11121113
* Optional pointer to function modifying VM's options.
11131114
*
1114-
* If the VM does not support this feature the pointer can be NULL.
1115+
* If the VM does not support this feature the pointer can be NULL.
11151116
*/
11161117
evmc_set_option_fn set_option;
11171118
};

0 commit comments

Comments
 (0)