aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/beam/erl_nif.c
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2016-04-10 22:48:55 +0200
committerBjörn-Egil Dahlberg <[email protected]>2016-04-22 23:24:53 +0200
commit65bd8ade865eebe0d8a3c3210a4e2e9f334e229f (patch)
tree535443ee4deba6136b397a4b04a325d0e83cdea3 /erts/emulator/beam/erl_nif.c
parentf2cef11a16d8d5f643cdf913b46042db71bff867 (diff)
downloadotp-65bd8ade865eebe0d8a3c3210a4e2e9f334e229f.tar.gz
otp-65bd8ade865eebe0d8a3c3210a4e2e9f334e229f.tar.bz2
otp-65bd8ade865eebe0d8a3c3210a4e2e9f334e229f.zip
erts: Add BIF maps:take/2
Diffstat (limited to 'erts/emulator/beam/erl_nif.c')
-rw-r--r--erts/emulator/beam/erl_nif.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/erts/emulator/beam/erl_nif.c b/erts/emulator/beam/erl_nif.c
index 73c0eb8eba..24e72cc949 100644
--- a/erts/emulator/beam/erl_nif.c
+++ b/erts/emulator/beam/erl_nif.c
@@ -2443,14 +2443,13 @@ int enif_make_map_remove(ErlNifEnv* env,
Eterm key,
Eterm *map_out)
{
- int res;
if (!is_map(map_in)) {
return 0;
}
flush_env(env);
- res = erts_maps_remove(env->proc, key, map_in, map_out);
+ (void) erts_maps_take(env->proc, key, map_in, map_out, NULL);
cache_env(env);
- return res;
+ return 1;
}
int enif_map_iterator_create(ErlNifEnv *env,