aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_map.h
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2013-09-30 20:13:07 +0200
committerBjörn-Egil Dahlberg <[email protected]>2014-01-28 15:56:26 +0100
commitbc0960c095e9482ba0f452c9df3623f5c9c54e1f (patch)
tree23fd2c358ca5a85c36a7fcbf1de66efeba10b122 /erts/emulator/beam/erl_map.h
parent43ed0cc716039c3b2f65a5395f00424169639309 (diff)
downloadotp-bc0960c095e9482ba0f452c9df3623f5c9c54e1f.tar.gz
otp-bc0960c095e9482ba0f452c9df3623f5c9c54e1f.tar.bz2
otp-bc0960c095e9482ba0f452c9df3623f5c9c54e1f.zip
erts: Introduce more Maps BIFs
* map:remove/2 * map:keys/1 * map:values/1 * map:is_key/2 * map:update/3 - Equivalent to ':=' operator in #{ K := V } maps. * map:from_list/1 - map:from_list/1 takes any unsorted key/value list, [{K,V}], and produces a map. Duplicate keys are removed. The latest key is kept. * map:find/2 - Searches for a pair that *equals* input key. * map:merge/2 - Merge two maps to one map.
Diffstat (limited to 'erts/emulator/beam/erl_map.h')
-rw-r--r--erts/emulator/beam/erl_map.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/erts/emulator/beam/erl_map.h b/erts/emulator/beam/erl_map.h
index ca8ce0f974..4f0d26e100 100644
--- a/erts/emulator/beam/erl_map.h
+++ b/erts/emulator/beam/erl_map.h
@@ -33,11 +33,12 @@ typedef struct map_s {
*
* -----------
* Eterm THING
- * Eterm Keys -> {K1, K2, K3, ..., Kn} where n = arity
+ * Uint size
+ * Eterm Keys -> {K1, K2, K3, ..., Kn} where n = size
* ----
* Eterm V1
* ...
- * Eterm Vn, where n = arity
+ * Eterm Vn, where n = size
* -----------
*/
@@ -59,6 +60,7 @@ typedef struct map_s {
#define map_get_size(x) (((map_t*)(x))->size)
#define MAP_HEADER _make_header(1,_TAG_HEADER_MAP)
+#define MAP_HEADER_SIZE (sizeof(map_t) / sizeof(Eterm))
#endif