EVM-C: Drop evm_get_info()

This commit is contained in:
Paweł Bylica 2016-08-25 15:01:49 +02:00
parent e0b0e0b027
commit 93f16f9380
3 changed files with 1 additions and 34 deletions

View File

@ -63,8 +63,6 @@ int64_t call(
/// Example how the API is supposed to be used.
int main(int argc, char *argv[]) {
printf("Using VM: %s (%s)\n", evm_get_info(EVM_NAME), evm_get_info(EVM_VERSION));
struct evm_interface intf = examplevm_get_interface();
struct evm_instance* jit = intf.create(query, update, call);

View File

@ -8,16 +8,6 @@ struct evm_instance {
evm_call_fn call_fn;
};
EXPORT char const* evm_get_info(enum evm_info_key key)
{
switch(key) {
case EVM_NAME: return "ExampleVM"; break;
case EVM_VERSION: return "git"; break;
}
return "";
}
static struct evm_instance* evm_create(evm_query_fn query_fn,
evm_update_fn update_fn,
evm_call_fn call_fn)
@ -77,7 +67,7 @@ static void evm_release_result(struct evm_result const* result)
{
}
EXPORT struct evm_interface examplevm_get_interface()
struct evm_interface examplevm_get_interface()
{
struct evm_interface intf;
memset(&intf, 0, sizeof(struct evm_result));

View File

@ -18,12 +18,6 @@
#include <stdint.h> // Definition of int64_t, uint64_t.
#include <stddef.h> // Definition of size_t.
/// Allow implementation to inject some additional information about function
/// linkage and/or symbol visibility in the output library.
#ifndef EXPORT
#define EXPORT
#endif
#if __cplusplus
extern "C" {
#endif
@ -263,21 +257,6 @@ typedef int64_t (*evm_call_fn)(
size_t output_size);
/// A piece of information about the EVM implementation.
enum evm_info_key {
EVM_NAME = 0, ///< The name of the EVM implementation. ASCII encoded.
EVM_VERSION = 1 ///< The software version of the EVM.
};
/// Request information about the EVM implementation.
/// FIXME: I don't think we need this, as we don't go towards fully dynamic
/// solution (DLLs, dlopen()). User should know a priori what he is
/// integrating with.
///
/// @param key What do you want to know?
/// @return Requested information as a c-string. Nonnull.
EXPORT char const* evm_get_info(enum evm_info_key key);
/// Opaque type representing a EVM instance.
struct evm_instance;