Skip to content

Commit

Permalink
Add evmc_set_tracer helper
Browse files Browse the repository at this point in the history
  • Loading branch information
axic committed Aug 20, 2018
1 parent 3730cfc commit 9dd6af0
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions include/evmc/helpers.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,19 @@ static inline int evmc_set_option(struct evmc_instance* instance,
return 0;
}

/**
* Sets the tracer callback for the VM instance, if the feature is supported by the VM.
*
* @see evmc_set_tracer_fn
*/
static inline void evmc_set_tracer(struct evmc_instance* instance,
evmc_trace_callback callback,
struct evmc_tracer_context* context)
{
if (instance->set_tracer)
instance->set_tracer(instance, callback, context);
}

/**
* Executes code in the VM instance.
*
Expand Down

0 comments on commit 9dd6af0

Please sign in to comment.