Extend the documentation of evmc_storage_status

This commit is contained in:
Paweł Bylica 2018-08-09 10:39:50 +02:00
parent e16f19e38d
commit 380ff4f501
No known key found for this signature in database
GPG Key ID: 7A0C037434FE77EF
1 changed files with 27 additions and 5 deletions

View File

@ -454,13 +454,35 @@ typedef void (*evmc_get_storage_fn)(struct evmc_uint256be* result,
/**
* The effect of an attempt to modify a contract storage item.
*
* For the purpose of explaining the meaning of each element, the following
* notation is used:
* - 0 is zero value,
* - X != 0 (X is any value other than 0),
* - Y != X, Y != 0 (Y is any value other than X and 0),
* - the "->" means the change from one value to another.
*/
enum evmc_storage_status
{
EVMC_STORAGE_UNCHANGED = 0, /**< The storage item value unchanged. */
EVMC_STORAGE_MODIFIED = 1, /**< The storage item value modified. */
EVMC_STORAGE_ADDED = 2, /**< The storage item added. */
EVMC_STORAGE_DELETED = 3, /**< The storage item deleted. */
/**
* The value of a storage item has been left unchanged: 0 -> 0 and X -> X.
*/
EVMC_STORAGE_UNCHANGED = 0,
/**
* The value of a storage item has been modified: X -> Y.
*/
EVMC_STORAGE_MODIFIED = 1,
/**
* A new storage item has been added: 0 -> X.
*/
EVMC_STORAGE_ADDED = 2,
/**
* A storage item has been deleted: X -> 0.
*/
EVMC_STORAGE_DELETED = 3,
};
@ -474,7 +496,7 @@ enum evmc_storage_status
* @param address The address of the contract.
* @param key The index of the storage entry.
* @param value The value to be stored.
* @return The effect on the storage item.
* @return The effect on the storage item, @see ::evmc_storage_status.
*/
typedef enum evmc_storage_status (*evmc_set_storage_fn)(struct evmc_context* context,
const struct evmc_address* address,