Skip to content

Commit

Permalink
Fix scope of is_debug helper
Browse files Browse the repository at this point in the history
  • Loading branch information
jakelang committed Mar 27, 2018
1 parent 01a54e3 commit 3f37273
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/hera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<hera_instance*>(instance);
return hera->debug;
}

namespace {

bool hasWasmPreamble(vector<uint8_t> const& _input) {
Expand Down Expand Up @@ -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<hera_instance*>(instance);
return hera->debug;
}

evm_result evm_execute(
evm_instance* instance,
evm_context* context,
Expand Down
2 changes: 2 additions & 0 deletions src/hera.h
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,8 @@ extern "C" {

struct evm_instance;

bool is_debug(evm_instance *instance);

HERA_EXPORT
struct evm_instance* hera_create(void);

Expand Down

0 comments on commit 3f37273

Please sign in to comment.