aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_hashmap.h
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2015-02-10 23:32:12 +0100
committerBjörn-Egil Dahlberg <[email protected]>2015-03-12 19:15:24 +0100
commit6cc099bf98f384de1de3c0d8542c83db43fb5cec (patch)
tree15f19f1e96bcc6b2c805d9ad186cf370e3dfda03 /erts/emulator/beam/erl_hashmap.h
parent442c9b4d11a62c55b46ffb25f27b5ec5fb3adda7 (diff)
downloadotp-6cc099bf98f384de1de3c0d8542c83db43fb5cec.tar.gz
otp-6cc099bf98f384de1de3c0d8542c83db43fb5cec.tar.bz2
otp-6cc099bf98f384de1de3c0d8542c83db43fb5cec.zip
erts: Make hashmap compare non-recursive
Diffstat (limited to 'erts/emulator/beam/erl_hashmap.h')
-rw-r--r--erts/emulator/beam/erl_hashmap.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_hashmap.h b/erts/emulator/beam/erl_hashmap.h
index 4a4163bce9..8ba249b053 100644
--- a/erts/emulator/beam/erl_hashmap.h
+++ b/erts/emulator/beam/erl_hashmap.h
@@ -24,7 +24,10 @@
#include "sys.h"
Eterm erts_hashmap_get(Eterm key, Eterm map);
-int hashmap_cmp(Eterm a, Eterm b);
+struct ErtsWStack_;
+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);
/* erl_term.h stuff */
#define make_hashmap(x) make_boxed((Eterm*)(x))
@@ -67,6 +70,9 @@ typedef struct hashmap_head_s {
Uint size;
Eterm items[1];
} hashmap_head_t;
+
+#define hashmap_size(x) (((hashmap_head_t*) hashmap_val(x))->size)
+#define hashmap_size_rel(RTERM, BASE) hashmap_size(rterm2wterm(RTERM, BASE))
/* the bitmap-node
* typedef struct hashmap_bitmap_node_s {