diff options
author | Sverker Eriksson <[email protected]> | 2015-05-27 17:53:59 +0200 |
---|---|---|
committer | Sverker Eriksson <[email protected]> | 2015-05-27 17:53:59 +0200 |
commit | 951b8c9076cc9a5283483633052587984274b8aa (patch) | |
tree | 8b9600004ff4e380347fa17888a82b2a674fb27f /erts/emulator/beam/erl_nif.c | |
parent | 50cdb87765cd46e0a809d97f62df28baf8a2c16a (diff) | |
download | otp-951b8c9076cc9a5283483633052587984274b8aa.tar.gz otp-951b8c9076cc9a5283483633052587984274b8aa.tar.bz2 otp-951b8c9076cc9a5283483633052587984274b8aa.zip |
erts: Rename ErlNifMapIteratorEntry enums
To differentiate between first/last map entry
and head/tail which is before/after first/last map entry.
Diffstat (limited to 'erts/emulator/beam/erl_nif.c')
-rw-r--r-- | erts/emulator/beam/erl_nif.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/erts/emulator/beam/erl_nif.c b/erts/emulator/beam/erl_nif.c index 426a00304e..4df34e4a06 100644 --- a/erts/emulator/beam/erl_nif.c +++ b/erts/emulator/beam/erl_nif.c @@ -2024,8 +2024,8 @@ int enif_map_iterator_create(ErlNifEnv *env, size_t offset; switch (entry) { - case ERL_NIF_MAP_ITERATOR_HEAD: offset = 0; break; - case ERL_NIF_MAP_ITERATOR_TAIL: offset = flatmap_get_size(mp) - 1; break; + case ERL_NIF_MAP_ITERATOR_FIRST: offset = 0; break; + case ERL_NIF_MAP_ITERATOR_LAST: offset = flatmap_get_size(mp) - 1; break; default: goto error; } @@ -2048,12 +2048,12 @@ int enif_map_iterator_create(ErlNifEnv *env, WSTACK_INIT(iter->u.hash.wstack, ERTS_ALC_T_NIF); switch (entry) { - case ERL_NIF_MAP_ITERATOR_HEAD: + case ERL_NIF_MAP_ITERATOR_FIRST: iter->idx = 1; hashmap_iterator_init(&iter->u.hash.wstack->ws, map, 0); iter->u.hash.kv = hashmap_iterator_next(&iter->u.hash.wstack->ws); break; - case ERL_NIF_MAP_ITERATOR_TAIL: + case ERL_NIF_MAP_ITERATOR_LAST: iter->idx = hashmap_size(map); hashmap_iterator_init(&iter->u.hash.wstack->ws, map, 1); iter->u.hash.kv = hashmap_iterator_prev(&iter->u.hash.wstack->ws); |