Merge pull request #165 from ethereum/examplevm

Do not pollute the header with examplevm_create()
This commit is contained in:
Alex Beregszaszi 2018-01-25 10:49:37 +00:00 committed by GitHub
commit 3d60258131
3 changed files with 6 additions and 3 deletions

View File

@ -1,9 +1,12 @@
#include <evm.h>
#include <inttypes.h> #include <inttypes.h>
#include <string.h> #include <string.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
#include "evm.h"
/// Prototype from examplevm.c
struct evm_instance* examplevm_create(void);
struct evm_uint256be balance(struct evm_context* context, struct evm_uint256be balance(struct evm_context* context,
const struct evm_address* address) const struct evm_address* address)

View File

@ -5,7 +5,6 @@
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
struct examplevm struct examplevm
{ {
struct evm_instance instance; struct evm_instance instance;

View File

@ -519,7 +519,8 @@ struct evm_instance {
/// The function SHOULD be named `<vm-name>_create(void)`. /// The function SHOULD be named `<vm-name>_create(void)`.
/// ///
/// @return EVM instance or NULL indicating instance creation failure. /// @return EVM instance or NULL indicating instance creation failure.
struct evm_instance* examplevm_create(void); ///
/// struct evm_instance* examplevm_create(void);
#if __cplusplus #if __cplusplus