diff options
author | Sverker Eriksson <[email protected]> | 2016-09-19 14:34:57 +0200 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2016-09-19 14:34:57 +0200 |
commit | 4f8071d81aa0690caa3adc734d73a1cb004ad808 (patch) | |
tree | 43891bce5cabd0baad365835b621971b2bc27940 /erts/emulator/test/nif_SUITE_data | |
parent | 7262d8630998517e97ec62a7e0d9cbdd23fdd9c8 (diff) | |
download | otp-4f8071d81aa0690caa3adc734d73a1cb004ad808.tar.gz otp-4f8071d81aa0690caa3adc734d73a1cb004ad808.tar.bz2 otp-4f8071d81aa0690caa3adc734d73a1cb004ad808.zip |
erts: Remove deprecated nif 'reload' feature
and instead let erlang:load_nif/2 return {error, {reload, _}}
before even trying to load the library
if a NIF library has already been successfully loaded
for the calling module instance.
Diffstat (limited to 'erts/emulator/test/nif_SUITE_data')
-rw-r--r-- | erts/emulator/test/nif_SUITE_data/nif_SUITE.c | 10 | ||||
-rw-r--r-- | erts/emulator/test/nif_SUITE_data/tester.c | 4 |
2 files changed, 3 insertions, 11 deletions
diff --git a/erts/emulator/test/nif_SUITE_data/nif_SUITE.c b/erts/emulator/test/nif_SUITE_data/nif_SUITE.c index f2b1ef9d24..99534a9694 100644 --- a/erts/emulator/test/nif_SUITE_data/nif_SUITE.c +++ b/erts/emulator/test/nif_SUITE_data/nif_SUITE.c @@ -184,14 +184,6 @@ static void resource_takeover(ErlNifEnv* env, PrivData* priv) msgenv_resource_type = rt; } -static int reload(ErlNifEnv* env, void** priv_data, ERL_NIF_TERM load_info) -{ - PrivData* priv = (PrivData*) *priv_data; - add_call(env, priv, "reload"); - resource_takeover(env,priv); - return 0; -} - static int upgrade(ErlNifEnv* env, void** priv_data, void** old_priv_data, ERL_NIF_TERM load_info) { PrivData* priv = (PrivData*) *old_priv_data; @@ -2094,4 +2086,4 @@ static ErlNifFunc nif_funcs[] = {"format_term_nif", 2, format_term} }; -ERL_NIF_INIT(nif_SUITE,nif_funcs,load,reload,upgrade,unload) +ERL_NIF_INIT(nif_SUITE,nif_funcs,load,NULL,upgrade,unload) diff --git a/erts/emulator/test/nif_SUITE_data/tester.c b/erts/emulator/test/nif_SUITE_data/tester.c index 257b116322..9e0074d554 100644 --- a/erts/emulator/test/nif_SUITE_data/tester.c +++ b/erts/emulator/test/nif_SUITE_data/tester.c @@ -53,7 +53,7 @@ void testcase_free(void *ptr) void testcase_run(TestCaseState_t *tcs); -static int reload(ErlNifEnv* env, void** priv_data, ERL_NIF_TERM load_info) +static int upgrade(ErlNifEnv* env, void** priv_data, void** old_priv_data, ERL_NIF_TERM load_info) { return 0; } @@ -70,5 +70,5 @@ static ErlNifFunc nif_funcs[] = {"run", 0, run} }; -ERL_NIF_INIT(tester,nif_funcs,NULL,reload,NULL,NULL) +ERL_NIF_INIT(tester,nif_funcs,NULL,NULL,upgrade,NULL) |