EVMC
Result Optional Storage

Helpers for optional storage of evmc_result. More...

Classes

union  evmc_result_optional_storage
 The union representing evmc_result "optional storage". More...
 

Functions

static union evmc_result_optional_storageevmc_get_optional_storage (struct evmc_result *result)
 Provides read-write access to evmc_result "optional storage". More...
 
static const union evmc_result_optional_storageevmc_get_const_optional_storage (const struct evmc_result *result)
 Provides read-only access to evmc_result "optional storage". More...
 

Detailed Description

Helpers for optional storage of evmc_result.

In some contexts (i.e. evmc_result::create_address is unused) objects of type evmc_result contains a memory storage that MAY be used by the object owner. This group defines helper types and functions for accessing the optional storage.

Function Documentation

◆ evmc_get_const_optional_storage()

static const union evmc_result_optional_storage * evmc_get_const_optional_storage ( const struct evmc_result result)
static

Provides read-only access to evmc_result "optional storage".

Definition at line 207 of file helpers.h.

209{
210 return (const union evmc_result_optional_storage*)&result->create_address;
211}
evmc_address create_address
The address of the possibly created contract.
Definition: evmc.h:453
The union representing evmc_result "optional storage".
Definition: helpers.h:194

◆ evmc_get_optional_storage()

static union evmc_result_optional_storage * evmc_get_optional_storage ( struct evmc_result result)
static

Provides read-write access to evmc_result "optional storage".

Definition at line 200 of file helpers.h.

202{
203 return (union evmc_result_optional_storage*)&result->create_address;
204}