aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_nif.c
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2014-10-28 15:08:05 +0100
committerBjörn-Egil Dahlberg <[email protected]>2014-10-28 15:08:05 +0100
commit6e30d2a47c2a2bded04b2a411161147cba7aca51 (patch)
treea9a6b59b2807b25277e4b8323987b2c7d30e08c2 /erts/emulator/beam/erl_nif.c
parentb1c1a40410c62273dd00e9ca1e29cf3056d41b67 (diff)
parenta2ffd6fd0e7f693847450aa633f7a4a18f9baead (diff)
downloadotp-6e30d2a47c2a2bded04b2a411161147cba7aca51.tar.gz
otp-6e30d2a47c2a2bded04b2a411161147cba7aca51.tar.bz2
otp-6e30d2a47c2a2bded04b2a411161147cba7aca51.zip
Merge branch 'egil/nox/maps-match_specs/OTP-12270'
* egil/nox/maps-match_specs/OTP-12270: erts: Fix return value from erts_maps_get to be const Properly support maps in match_specs Support maps in ms_transform Return pointer to value in erts_maps_get()
Diffstat (limited to 'erts/emulator/beam/erl_nif.c')
-rw-r--r--erts/emulator/beam/erl_nif.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/erts/emulator/beam/erl_nif.c b/erts/emulator/beam/erl_nif.c
index 3708133f40..caa9eba8a7 100644
--- a/erts/emulator/beam/erl_nif.c
+++ b/erts/emulator/beam/erl_nif.c
@@ -1954,10 +1954,16 @@ int enif_get_map_value(ErlNifEnv* env,
Eterm key,
Eterm *value)
{
+ const Eterm *ret;
if (is_not_map(map)) {
return 0;
}
- return erts_maps_get(key, map, value);
+ ret = erts_maps_get(key, map);
+ if (ret) {
+ *value = *ret;
+ return 1;
+ }
+ return 0;
}
int enif_make_map_update(ErlNifEnv* env,