Fall back to evmc_create in the loader as a last resort

This commit is contained in:
Alex Beregszaszi 2018-08-25 16:30:53 +01:00
parent 048152a1bf
commit b3959ec74b
2 changed files with 5 additions and 1 deletions

View File

@ -66,8 +66,9 @@ enum evmc_loader_error_code
* "interpreter",
* - the name "evmc_create_" + _full name_ is checked in the library:
* "evmc_create_example_interpreter",
* - the name "evmc_create_" + _short name_ is checked in the library:
* - then, the name "evmc_create_" + _short name_ is checked in the library:
* "evmc_create_interpreter".
* - lastly, the name "evmc_create" is checked in the library
*
* If the create function is found in the library, the pointer to the function is returned.
* Otherwise, the ::EVMC_LOADER_SYMBOL_NOT_FOUND error code is signaled and NULL is returned.

View File

@ -112,6 +112,9 @@ evmc_create_fn evmc_load(const char* filename, enum evmc_loader_error_code* erro
}
}
if (!create_fn)
create_fn = DLL_GET_CREATE_FN(handle, "evmc_create");
if (!create_fn)
{
DLL_CLOSE(handle);