diff options
author | Björn-Egil Dahlberg <[email protected]> | 2015-03-03 13:34:14 +0100 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2015-03-12 19:15:31 +0100 |
commit | de95f407aba2c8b7bf2a5827842722581aacfd6a (patch) | |
tree | 5b1c7e27c87187b88855353f87aace6bdb6ac499 /erts/emulator/beam/erl_map.h | |
parent | 9794b73998690178538a1dfc193565dcd477b4fe (diff) | |
download | otp-de95f407aba2c8b7bf2a5827842722581aacfd6a.tar.gz otp-de95f407aba2c8b7bf2a5827842722581aacfd6a.tar.bz2 otp-de95f407aba2c8b7bf2a5827842722581aacfd6a.zip |
erts: Refactor hashmap_from_ks_and_vs
Use extra key and value if needed.
Diffstat (limited to 'erts/emulator/beam/erl_map.h')
-rw-r--r-- | erts/emulator/beam/erl_map.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_map.h b/erts/emulator/beam/erl_map.h index 6a7b29fe86..d1e227183f 100644 --- a/erts/emulator/beam/erl_map.h +++ b/erts/emulator/beam/erl_map.h @@ -103,9 +103,14 @@ void hashmap_iterator_init(struct ErtsWStack_* s, Eterm node); Eterm* hashmap_iterator_next(struct ErtsWStack_* s); int hashmap_key_hash_cmp(Eterm* ap, Eterm* bp); Eterm erts_hashmap_from_array(Process *p, Eterm *leafs, Uint n); -Eterm erts_hashmap_from_ks_and_vs(Process *p, Eterm *ks, Eterm *vs, Uint n); const Eterm *erts_hashmap_get(Uint32 hx, Eterm key, Eterm map); +#define erts_hashmap_from_ks_and_vs(P, KS, VS, N) \ + erts_hashmap_from_ks_and_vs_extra((P), (KS), (VS), (N), THE_NON_VALUE, THE_NON_VALUE); + +Eterm erts_hashmap_from_ks_and_vs_extra(Process *p, Eterm *ks, Eterm *vs, Uint n, + Eterm k, Eterm v); + #if HALFWORD_HEAP const Eterm * erts_maps_get_rel(Eterm key, Eterm map, Eterm *map_base); |