diff options
author | Guilherme Andrade <[email protected]> | 2016-06-03 00:39:01 +0100 |
---|---|---|
committer | Guilherme Andrade <[email protected]> | 2017-03-22 23:04:35 +0000 |
commit | 5b7e50500f6cb3e680b277f871392ac706c5c1d7 (patch) | |
tree | afe3cfb1d0695c1e48465269fbece8e16cb4a684 /lib/stdlib/src | |
parent | c5e09d9315044bb9ac27702f6a9d3c6f290a3b8e (diff) | |
download | otp-5b7e50500f6cb3e680b277f871392ac706c5c1d7.tar.gz otp-5b7e50500f6cb3e680b277f871392ac706c5c1d7.tar.bz2 otp-5b7e50500f6cb3e680b277f871392ac706c5c1d7.zip |
ETS: Allow for matchspec-based replacement
Diffstat (limited to 'lib/stdlib/src')
-rw-r--r-- | lib/stdlib/src/ets.erl | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/stdlib/src/ets.erl b/lib/stdlib/src/ets.erl index 90e19e6b9f..195a407570 100644 --- a/lib/stdlib/src/ets.erl +++ b/lib/stdlib/src/ets.erl @@ -70,7 +70,7 @@ match_object/2, match_object/3, match_spec_compile/1, match_spec_run_r/3, member/2, new/2, next/2, prev/2, rename/2, safe_fixtable/2, select/1, select/2, select/3, - select_count/2, select_delete/2, select_reverse/1, + select_count/2, select_delete/2, select_replace/2, select_reverse/1, select_reverse/2, select_reverse/3, setopts/2, slot/2, take/2, update_counter/3, update_counter/4, update_element/3]). @@ -379,6 +379,14 @@ select_count(_, _) -> select_delete(_, _) -> erlang:nif_error(undef). +-spec select_replace(Tab, MatchSpec) -> NumReplaced when + Tab :: tab(), + MatchSpec :: match_spec(), + NumReplaced :: non_neg_integer(). + +select_replace(_, _) -> + erlang:nif_error(undef). + -spec select_reverse(Tab, MatchSpec) -> [Match] when Tab :: tab(), MatchSpec :: match_spec(), |