From 3f37273131e79f0299fdc9456ba3374c72c03032 Mon Sep 17 00:00:00 2001 From: Jake Lang Date: Mon, 26 Mar 2018 20:16:39 -0400 Subject: [PATCH] Fix scope of is_debug helper --- src/hera.cpp | 12 ++++++------ src/hera.h | 2 ++ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/src/hera.cpp b/src/hera.cpp index 8b17e9f37..05dd2366a 100644 --- a/src/hera.cpp +++ b/src/hera.cpp @@ -55,6 +55,12 @@ struct hera_instance : evm_instance { hera_instance() : evm_instance({EVM_ABI_VERSION, nullptr, nullptr, nullptr}) {} }; +bool is_debug(evm_instance *instance) +{ + hera_instance *hera = static_cast(instance); + return hera->debug; +} + namespace { bool hasWasmPreamble(vector const& _input) { @@ -249,12 +255,6 @@ void evm_destroy_result(evm_result const* result) delete[] result->output_data; } -bool is_debug(evm_instance *instance) -{ - hera_instance *hera = static_cast(instance); - return hera->debug; -} - evm_result evm_execute( evm_instance* instance, evm_context* context, diff --git a/src/hera.h b/src/hera.h index 5fa830859..2a2eca265 100644 --- a/src/hera.h +++ b/src/hera.h @@ -42,6 +42,8 @@ extern "C" { struct evm_instance; +bool is_debug(evm_instance *instance); + HERA_EXPORT struct evm_instance* hera_create(void);