From 0877e9d9bd649be75e77bfc15bd004ff233d2b2a Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Wed, 24 Jan 2018 22:38:17 +0000 Subject: [PATCH] Do not pollute the header with examplevm_create() --- examples/capi.c | 5 ++++- examples/examplevm.c | 1 - include/evm.h | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/examples/capi.c b/examples/capi.c index f290dad..3d09893 100644 --- a/examples/capi.c +++ b/examples/capi.c @@ -1,9 +1,12 @@ +#include + #include #include #include #include -#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) diff --git a/examples/examplevm.c b/examples/examplevm.c index 8cc77cb..ff0a462 100644 --- a/examples/examplevm.c +++ b/examples/examplevm.c @@ -5,7 +5,6 @@ #include #include - struct examplevm { struct evm_instance instance; diff --git a/include/evm.h b/include/evm.h index 270d3a9..efd4e5d 100644 --- a/include/evm.h +++ b/include/evm.h @@ -519,7 +519,8 @@ struct evm_instance { /// The function SHOULD be named `_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