aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src/ets.erl
diff options
context:
space:
mode:
authorAnthony Ramine <[email protected]>2014-05-25 16:06:17 +0200
committerAnthony Ramine <[email protected]>2014-05-30 16:04:30 +0200
commit7adc2c36b0e839384baac50be35c0999d1e546df (patch)
treefb5943c386e0308509b655735d445755262e7d20 /lib/stdlib/src/ets.erl
parente7e750a40ff875e6d62f1e7904470222ac8de269 (diff)
downloadotp-7adc2c36b0e839384baac50be35c0999d1e546df.tar.gz
otp-7adc2c36b0e839384baac50be35c0999d1e546df.tar.bz2
otp-7adc2c36b0e839384baac50be35c0999d1e546df.zip
Implement ets:take/2
This new ETS BIF returns and deletes objects from tables.
Diffstat (limited to 'lib/stdlib/src/ets.erl')
-rw-r--r--lib/stdlib/src/ets.erl9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/stdlib/src/ets.erl b/lib/stdlib/src/ets.erl
index 42b11a97e2..902ccbe11a 100644
--- a/lib/stdlib/src/ets.erl
+++ b/lib/stdlib/src/ets.erl
@@ -71,6 +71,7 @@
rename/2, safe_fixtable/2, select/1, select/2, select/3,
select_count/2, select_delete/2, select_reverse/1,
select_reverse/2, select_reverse/3, setopts/2, slot/2,
+ take/2,
update_counter/3, update_element/3]).
-spec all() -> [Tab] when
@@ -400,6 +401,14 @@ setopts(_, _) ->
slot(_, _) ->
erlang:nif_error(undef).
+-spec take(Tab, Key) -> [Object] when
+ Tab :: tab(),
+ Key :: term(),
+ Object :: tuple().
+
+take(_, _) ->
+ erlang:nif_error(undef).
+
-spec update_counter(Tab, Key, UpdateOp) -> Result when
Tab :: tab(),
Key :: term(),