aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_map.c
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2018-04-25 10:34:26 +0200
committerBjörn Gustavsson <[email protected]>2018-04-25 10:34:26 +0200
commit3682b7dab5a67843e54f0a93cc00a08b235c20c7 (patch)
treeba8c5d7d660c3ab387e2d250cf520e1b784cf3d9 /erts/emulator/beam/erl_map.c
parent0e669ed13e20d5d68aa617aacd807eca7268d070 (diff)
parentad72c0d37ffb214cac874f51ac29fe2cdb47a2a4 (diff)
downloadotp-3682b7dab5a67843e54f0a93cc00a08b235c20c7.tar.gz
otp-3682b7dab5a67843e54f0a93cc00a08b235c20c7.tar.bz2
otp-3682b7dab5a67843e54f0a93cc00a08b235c20c7.zip
Merge branch 'map-get-bif' of git://github.com/michalmuskala/otp
* 'map-get-bif' of git://github.com/michalmuskala/otp: Introduce map_get guard-safe function OTP-15037
Diffstat (limited to 'erts/emulator/beam/erl_map.c')
-rw-r--r--erts/emulator/beam/erl_map.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_map.c b/erts/emulator/beam/erl_map.c
index 4ec6960997..f577b017c3 100644
--- a/erts/emulator/beam/erl_map.c
+++ b/erts/emulator/beam/erl_map.c
@@ -44,6 +44,7 @@
* DONE:
* - erlang:is_map/1
* - erlang:map_size/1
+ * - erlang:map_get/2
*
* - maps:find/2
* - maps:from_list/1
@@ -202,7 +203,7 @@ BIF_RETTYPE maps_find_2(BIF_ALIST_2) {
BIF_ERROR(BIF_P, BADMAP);
}
-/* maps:get/2
+/* maps:get/2 and erlang:map_get/2
* return value if key *matches* a key in the map
* exception badkey if none matches
*/
@@ -223,6 +224,10 @@ BIF_RETTYPE maps_get_2(BIF_ALIST_2) {
BIF_ERROR(BIF_P, BADMAP);
}
+BIF_RETTYPE map_get_2(BIF_ALIST_2) {
+ BIF_RET(maps_get_2(BIF_CALL_ARGS));
+}
+
/* maps:from_list/1
* List may be unsorted [{K,V}]
*/