From 609e4ee3f764ae31febdb492bed065ea443f3e40 Mon Sep 17 00:00:00 2001 From: Alex Beregszaszi Date: Sun, 26 Aug 2018 12:30:44 +0100 Subject: [PATCH] Add evmc_instance_name/version into helpers --- include/evmc/helpers.h | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/include/evmc/helpers.h b/include/evmc/helpers.h index 36c14ec..30d60de 100644 --- a/include/evmc/helpers.h +++ b/include/evmc/helpers.h @@ -18,13 +18,29 @@ #include /** - * Returns true if the instance has a compatible ABI version. + * Returns true if the VM instance has a compatible ABI version. */ static inline int evmc_is_abi_compatible(struct evmc_instance *instance) { return instance->abi_version == EVMC_ABI_VERSION; } +/** + * Returns the name of the VM instance. + */ +static inline const char* evmc_instance_name(struct evmc_instance *instance) +{ + return instance->name; +} + +/** + * Returns the version of the VM instance. + */ +static inline const char* evmc_instance_version(struct evmc_instance *instance) +{ + return instance->version; +} + /** * Destroys the VM instance. *