From f002511ea76a8a8e357ba47566e6e6945bb621e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Bylica?= Date: Thu, 7 Nov 2019 16:45:02 +0100 Subject: [PATCH] interpreter: Rename create function to match EVMC7 loader requirements --- libaleth-interpreter/VM.cpp | 2 +- libaleth-interpreter/interpreter.h | 2 +- libevm/VMFactory.cpp | 2 +- test/unittests/libevm/VMTest.cpp | 10 +++++----- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/libaleth-interpreter/VM.cpp b/libaleth-interpreter/VM.cpp index 639106cb4e2..a8c69d446f7 100644 --- a/libaleth-interpreter/VM.cpp +++ b/libaleth-interpreter/VM.cpp @@ -101,7 +101,7 @@ evmc_result execute(evmc_vm* _instance, const evmc_host_interface* _host, } } // namespace -extern "C" evmc_vm* evmc_create_interpreter() noexcept +extern "C" evmc_vm* evmc_create_aleth_interpreter() noexcept { // TODO: Allow creating multiple instances with different configurations. static evmc_vm s_vm{ diff --git a/libaleth-interpreter/interpreter.h b/libaleth-interpreter/interpreter.h index 666a2b84564..b9963e50352 100644 --- a/libaleth-interpreter/interpreter.h +++ b/libaleth-interpreter/interpreter.h @@ -10,7 +10,7 @@ extern "C" { #endif -EVMC_EXPORT struct evmc_vm* evmc_create_interpreter() EVMC_NOEXCEPT; +EVMC_EXPORT struct evmc_vm* evmc_create_aleth_interpreter() EVMC_NOEXCEPT; #if __cplusplus } diff --git a/libevm/VMFactory.cpp b/libevm/VMFactory.cpp index 1bd848d1cd2..b104db16e33 100644 --- a/libevm/VMFactory.cpp +++ b/libevm/VMFactory.cpp @@ -174,7 +174,7 @@ VMPtr VMFactory::create(VMKind _kind) switch (_kind) { case VMKind::Interpreter: - return {new EVMC{evmc_create_interpreter()}, default_delete}; + return {new EVMC{evmc_create_aleth_interpreter()}, default_delete}; case VMKind::DLL: assert(g_evmcDll != nullptr); // Return "fake" owning pointer to global EVMC DLL VM. diff --git a/test/unittests/libevm/VMTest.cpp b/test/unittests/libevm/VMTest.cpp index d23d4ef2cf2..18b99133e70 100644 --- a/test/unittests/libevm/VMTest.cpp +++ b/test/unittests/libevm/VMTest.cpp @@ -208,7 +208,7 @@ class LegacyVMCreate2TestFixture: public Create2TestFixture class AlethInterpreterCreate2TestFixture: public Create2TestFixture { public: - AlethInterpreterCreate2TestFixture(): Create2TestFixture{new EVMC{evmc_create_interpreter()}} {} + AlethInterpreterCreate2TestFixture(): Create2TestFixture{new EVMC{evmc_create_aleth_interpreter()}} {} }; class ExtcodehashTestFixture : public TestOutputHelperFixture @@ -376,7 +376,7 @@ class AlethInterpreterExtcodehashTestFixture : public ExtcodehashTestFixture { public: AlethInterpreterExtcodehashTestFixture() - : ExtcodehashTestFixture{new EVMC{evmc_create_interpreter()}} + : ExtcodehashTestFixture{new EVMC{evmc_create_aleth_interpreter()}} {} }; @@ -546,7 +546,7 @@ class LegacyVMSstoreTestFixture : public SstoreTestFixture class AlethInterpreterSstoreTestFixture : public SstoreTestFixture { public: - AlethInterpreterSstoreTestFixture() : SstoreTestFixture{new EVMC{evmc_create_interpreter()}} {} + AlethInterpreterSstoreTestFixture() : SstoreTestFixture{new EVMC{evmc_create_aleth_interpreter()}} {} }; class ChainIDTestFixture : public TestOutputHelperFixture @@ -630,7 +630,7 @@ class LegacyVMChainIDTestFixture : public ChainIDTestFixture class AlethInterpreterChainIDTestFixture : public ChainIDTestFixture { public: - AlethInterpreterChainIDTestFixture() : ChainIDTestFixture{new EVMC{evmc_create_interpreter()}} + AlethInterpreterChainIDTestFixture() : ChainIDTestFixture{new EVMC{evmc_create_aleth_interpreter()}} {} }; @@ -749,7 +749,7 @@ class LegacyVMBalanceFixture : public BalanceFixture class AlethInterpreterBalanceFixture : public BalanceFixture { public: - AlethInterpreterBalanceFixture() : BalanceFixture{new EVMC{evmc_create_interpreter()}} {} + AlethInterpreterBalanceFixture() : BalanceFixture{new EVMC{evmc_create_aleth_interpreter()}} {} }; } // namespace