Add evmc_instance_name/version into helpers

This commit is contained in:
Alex Beregszaszi 2018-08-26 12:30:44 +01:00
parent 048152a1bf
commit 609e4ee3f7
1 changed files with 17 additions and 1 deletions

View File

@ -18,13 +18,29 @@
#include <evmc/evmc.h> #include <evmc/evmc.h>
/** /**
* 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) static inline int evmc_is_abi_compatible(struct evmc_instance *instance)
{ {
return instance->abi_version == EVMC_ABI_VERSION; 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. * Destroys the VM instance.
* *