aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_nif.c
diff options
context:
space:
mode:
authorAnthony Ramine <[email protected]>2014-06-27 14:41:12 +0200
committerAnthony Ramine <[email protected]>2014-08-20 12:29:36 +0200
commit631474e50fd84fd526dd1a5db4753b3d27ebb8e7 (patch)
tree18c0dbade65632e06392cd172abc21841698a695 /erts/emulator/beam/erl_nif.c
parent1b9383a8dbc03473860dfaacc7a02fbc8b1b1185 (diff)
downloadotp-631474e50fd84fd526dd1a5db4753b3d27ebb8e7.tar.gz
otp-631474e50fd84fd526dd1a5db4753b3d27ebb8e7.tar.bz2
otp-631474e50fd84fd526dd1a5db4753b3d27ebb8e7.zip
Return pointer to value in erts_maps_get()
While at it, implement erts_maps_get_rel() for halfword support.
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 ff551ea3af..dd88f59908 100644
--- a/erts/emulator/beam/erl_nif.c
+++ b/erts/emulator/beam/erl_nif.c
@@ -1733,10 +1733,16 @@ int enif_get_map_value(ErlNifEnv* env,
Eterm key,
Eterm *value)
{
+ 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,