Skip to content
This repository has been archived by the owner on Oct 28, 2021. It is now read-only.

Commit

Permalink
interpreter: Rename create function to match EVMC7 loader requirements
Browse files Browse the repository at this point in the history
  • Loading branch information
chfast committed Nov 12, 2019
1 parent 093e9bc commit a32f3c1
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion libaleth-interpreter/VM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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{
Expand Down
2 changes: 1 addition & 1 deletion libaleth-interpreter/interpreter.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion libevm/VMFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
10 changes: 5 additions & 5 deletions test/unittests/libevm/VMTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -376,7 +376,7 @@ class AlethInterpreterExtcodehashTestFixture : public ExtcodehashTestFixture
{
public:
AlethInterpreterExtcodehashTestFixture()
: ExtcodehashTestFixture{new EVMC{evmc_create_interpreter()}}
: ExtcodehashTestFixture{new EVMC{evmc_create_aleth_interpreter()}}
{}
};

Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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()}}
{}
};

Expand Down Expand Up @@ -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

Expand Down

0 comments on commit a32f3c1

Please sign in to comment.