aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_nif.c
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2018-03-20 18:55:51 +0100
committerSverker Eriksson <[email protected]>2018-03-20 18:55:51 +0100
commit5b557bccac579291301a7a4d78a3d992b4e9373d (patch)
treeeb2e6c5925bb84e7016468fb37a9a033d0b32952 /erts/emulator/beam/erl_nif.c
parent902e1df69542e07e7c363f5b599ac1551b8fbb64 (diff)
downloadotp-5b557bccac579291301a7a4d78a3d992b4e9373d.tar.gz
otp-5b557bccac579291301a7a4d78a3d992b4e9373d.tar.bz2
otp-5b557bccac579291301a7a4d78a3d992b4e9373d.zip
erts: Refactor erts_static_nif_get_nif_init
to return pointer to ErtsStaticNifEntry.
Diffstat (limited to 'erts/emulator/beam/erl_nif.c')
-rw-r--r--erts/emulator/beam/erl_nif.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/erts/emulator/beam/erl_nif.c b/erts/emulator/beam/erl_nif.c
index 121a7d943f..0720796b53 100644
--- a/erts/emulator/beam/erl_nif.c
+++ b/erts/emulator/beam/erl_nif.c
@@ -3938,10 +3938,14 @@ BIF_RETTYPE load_nif_2(BIF_ALIST_2)
ASSERT(module_p != NULL);
mod_atomp = atom_tab(atom_val(mod_atom));
- init_func = erts_static_nif_get_nif_init((char*)mod_atomp->name, mod_atomp->len);
- if (init_func != NULL)
- handle = init_func;
-
+ {
+ ErtsStaticNifEntry* sne;
+ sne = erts_static_nif_get_nif_init((char*)mod_atomp->name, mod_atomp->len);
+ if (sne != NULL) {
+ init_func = sne->nif_init;
+ handle = init_func;
+ }
+ }
this_mi = &module_p->curr;
prev_mi = &module_p->old;
if (in_area(caller, module_p->old.code_hdr, module_p->old.code_length)) {