diff options
author | Sverker Eriksson <[email protected]> | 2017-11-15 14:58:02 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2017-11-15 14:58:02 +0100 |
commit | 355e7855919e2a82856b27d45cb692a087da0385 (patch) | |
tree | 6c1f8aec1d80a42c4c5cf7f5b5455da39102e2d7 /erts/preloaded/src/erlang.erl | |
parent | 0d9d1f1915ac70ba00418fd24a4293bb22c4fade (diff) | |
parent | 6a6019c287a54b71d4d0bcf0a72d244d89de90d1 (diff) | |
download | otp-355e7855919e2a82856b27d45cb692a087da0385.tar.gz otp-355e7855919e2a82856b27d45cb692a087da0385.tar.bz2 otp-355e7855919e2a82856b27d45cb692a087da0385.zip |
Merge PR-1605 from sverker/sverker/binary_to_term-used OTP-14780
Add 'used' option for binary_to_term/2
Diffstat (limited to 'erts/preloaded/src/erlang.erl')
-rw-r--r-- | erts/preloaded/src/erlang.erl | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/erts/preloaded/src/erlang.erl b/erts/preloaded/src/erlang.erl index f743b7d26b..80bceae506 100644 --- a/erts/preloaded/src/erlang.erl +++ b/erts/preloaded/src/erlang.erl @@ -427,9 +427,11 @@ binary_to_term(_Binary) -> erlang:nif_error(undefined). %% binary_to_term/2 --spec binary_to_term(Binary, Opts) -> term() when +-spec binary_to_term(Binary, Opts) -> term() | {term(), Used} when Binary :: ext_binary(), - Opts :: [safe]. + Opt :: safe | used, + Opts :: [Opt], + Used :: pos_integer(). binary_to_term(_Binary, _Opts) -> erlang:nif_error(undefined). |