Merge pull request #97 from ethereum/release-result-comment

Add comment why the result is a pointer in release_result
This commit is contained in:
Paweł Bylica 2018-08-28 11:48:48 +02:00 committed by GitHub
commit aa394fd818
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 15 additions and 5 deletions

View File

@ -4,6 +4,10 @@
- Feature: [[#81](https://github.com/ethereum/evmc/pull/81)]
Use also "evmc_create" function name for loading EVMC DLLs.
- Fix: [[#92](https://github.com/ethereum/evmc/pull/92)]
The evmc.h header compatibility with C++98 fixed.
- Improved: [[#97](https://github.com/ethereum/evmc/pull/97)]
Documentation improvements.
## [5.1.0] - 2018-08-23

View File

@ -298,12 +298,18 @@ struct evmc_result;
/**
* Releases resources assigned to an execution result.
*
* This function releases memory (and other resources, if any) assigned to the
* specified execution result making the result object invalid.
* This function releases memory (and other resources, if any) assigned to the
* specified execution result making the result object invalid.
*
* @param result The execution result which resource are to be released. The
* result itself it not modified by this function, but becomes
* invalid and user should discard it as well.
* @param result The execution result which resources are to be released. The
* result itself it not modified by this function, but becomes
* invalid and user MUST discard it as well.
* This MUST NOT be NULL.
*
* @note
* The result is passed by pointer to avoid (shallow) copy of the ::evmc_result
* struct. Think of this as the best possible C language approximation to
* passing objects by reference.
*/
typedef void (*evmc_release_result_fn)(const struct evmc_result* result);