aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/src
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2014-12-16 15:34:40 +0100
committerSverker Eriksson <[email protected]>2014-12-16 15:34:40 +0100
commit1717e36291bad837899fd5a35898ccef21358364 (patch)
tree340e0a4a7ecc8a81cdcb6f8fbb4bddb1f7e567e5 /lib/stdlib/src
parentc4228fb7cb3bd651dd44f8dfd9a4f91f41d5cc2c (diff)
parentafd79e01d3375d8e8217b258ffb4d9b90541c922 (diff)
downloadotp-1717e36291bad837899fd5a35898ccef21358364.tar.gz
otp-1717e36291bad837899fd5a35898ccef21358364.tar.bz2
otp-1717e36291bad837899fd5a35898ccef21358364.zip
Merge branch 'sverk/ets-take-2/OTP-12309'
* sverk/ets-take-2/OTP-12309: erts: Optimize ets:lookup and ets:take for bags Implement ets:take/2
Diffstat (limited to 'lib/stdlib/src')
-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(),