Skip to content

Commit

Permalink
Merge pull request #165 from ethereum/examplevm
Browse files Browse the repository at this point in the history
Do not pollute the header with examplevm_create()
  • Loading branch information
axic authored Jan 25, 2018
2 parents e5d4a82 + 6419844 commit 34f15d9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
5 changes: 4 additions & 1 deletion examples/capi.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
#include <evm.h>

#include <inttypes.h>
#include <string.h>
#include <stdio.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,
const struct evm_address* address)
Expand Down
1 change: 0 additions & 1 deletion examples/examplevm.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
#include <stdlib.h>
#include <string.h>


struct examplevm
{
struct evm_instance instance;
Expand Down
3 changes: 2 additions & 1 deletion include/evm.h
Original file line number Diff line number Diff line change
Expand Up @@ -519,7 +519,8 @@ struct evm_instance {
/// The function SHOULD be named `<vm-name>_create(void)`.
///
/// @return EVM instance or NULL indicating instance creation failure.
struct evm_instance* examplevm_create(void);
///
/// struct evm_instance* examplevm_create(void);


#if __cplusplus
Expand Down

0 comments on commit 34f15d9

Please sign in to comment.