diff options
author | Björn-Egil Dahlberg <[email protected]> | 2016-04-10 22:48:55 +0200 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2016-04-22 23:24:53 +0200 |
commit | 65bd8ade865eebe0d8a3c3210a4e2e9f334e229f (patch) | |
tree | 535443ee4deba6136b397a4b04a325d0e83cdea3 /erts/emulator/beam/erl_nif.c | |
parent | f2cef11a16d8d5f643cdf913b46042db71bff867 (diff) | |
download | otp-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.c | 5 |
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, |