diff options
author | Sverker Eriksson <[email protected]> | 2012-01-23 16:46:53 +0100 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2012-02-21 12:23:01 +0100 |
commit | 48e662a63e80c4f358be1ba062615ff56e09f331 (patch) | |
tree | a253cb707b95528e46137654e667426ea223e465 /erts/emulator/beam/module.c | |
parent | 194ae0717f9be27374db3609e6884fad086df4df (diff) | |
download | otp-48e662a63e80c4f358be1ba062615ff56e09f331.tar.gz otp-48e662a63e80c4f358be1ba062615ff56e09f331.tar.bz2 otp-48e662a63e80c4f358be1ba062615ff56e09f331.zip |
erts: Refactor new function index_put_entry()
Same as index_put() but returns pointer to entry instead of index integer.
Diffstat (limited to 'erts/emulator/beam/module.c')
-rw-r--r-- | erts/emulator/beam/module.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/erts/emulator/beam/module.c b/erts/emulator/beam/module.c index ab4f387982..f326aecebf 100644 --- a/erts/emulator/beam/module.c +++ b/erts/emulator/beam/module.c @@ -122,7 +122,6 @@ Module* erts_put_module(Eterm mod) { Module e; - int index; IndexTable* mod_tab; ASSERT(is_atom(mod)); @@ -132,8 +131,7 @@ erts_put_module(Eterm mod) mod_tab = &module_tables[erts_loader_code_ix()]; e.module = atom_val(mod); - index = index_put(mod_tab, (void*) &e); - return (Module*) erts_index_lookup(mod_tab, index); + return (Module*) index_put_entry(mod_tab, (void*) &e); } Module *module_code(int i, ErtsCodeIndex code_ix) @@ -185,7 +183,7 @@ void module_start_load(void) */ for (i = dst->entries; i < src->entries; i++) { src_mod = (Module*) erts_index_lookup(src, i); - dst_mod = (Module*) erts_index_lookup(dst, index_put(dst, src_mod)); + dst_mod = (Module*) index_put_entry(dst, src_mod); ASSERT(dst_mod != src_mod); dst_mod->curr = src_mod->curr; |