aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_db_util.c
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2015-03-11 20:39:08 +0100
committerBjörn-Egil Dahlberg <[email protected]>2015-03-12 19:15:34 +0100
commit81551dd13167b9c4458c4fee7ce08e152f9f5273 (patch)
treeb609eb04cb28d120185d83c60066321b7b9a8def /erts/emulator/beam/erl_db_util.c
parentc8f731bfec32a34d49304ea78017b63af053eecd (diff)
downloadotp-81551dd13167b9c4458c4fee7ce08e152f9f5273.tar.gz
otp-81551dd13167b9c4458c4fee7ce08e152f9f5273.tar.bz2
otp-81551dd13167b9c4458c4fee7ce08e152f9f5273.zip
erts: Make hashmap iterator more flexible
to allow mixing of 'next' and 'prev' operations.
Diffstat (limited to 'erts/emulator/beam/erl_db_util.c')
-rw-r--r--erts/emulator/beam/erl_db_util.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/erts/emulator/beam/erl_db_util.c b/erts/emulator/beam/erl_db_util.c
index efbefb7492..e522876d03 100644
--- a/erts/emulator/beam/erl_db_util.c
+++ b/erts/emulator/beam/erl_db_util.c
@@ -1435,7 +1435,7 @@ restart:
}
structure_checked = 0;
- hashmap_iterator_init(&wstack, t);
+ hashmap_iterator_init(&wstack, t, 0);
while ((kv=hashmap_iterator_next(&wstack)) != NULL) {
Eterm key = CAR(kv);
@@ -3872,7 +3872,7 @@ dmc_map(DMCContext *context, DMCHeap *heap, DMC_STACK_TYPE(UWord) *text,
ASSERT(is_hashmap(t));
- hashmap_iterator_init(&wstack, t);
+ hashmap_iterator_init(&wstack, t, 1);
constant_values = 1;
nelems = hashmap_size(t);
@@ -3893,7 +3893,7 @@ dmc_map(DMCContext *context, DMCHeap *heap, DMC_STACK_TYPE(UWord) *text,
*constant = 0;
- hashmap_iterator_init(&wstack, t);
+ hashmap_iterator_init(&wstack, t, 1);
while ((kv=hashmap_iterator_prev(&wstack)) != NULL) {
/* push key */