diff options
author | Rickard Green <[email protected]> | 2014-05-19 18:09:13 +0200 |
---|---|---|
committer | Rickard Green <[email protected]> | 2014-06-05 14:38:12 +0200 |
commit | 82c048745efcb5d811ec0489858b821ef39ea387 (patch) | |
tree | 62466297ce35ebc60d2b476aadb4422cd13dbea5 /erts/preloaded/src/erlang.erl | |
parent | efa69184de378b99b1d222c5a0b1c07d9b5a39aa (diff) | |
download | otp-82c048745efcb5d811ec0489858b821ef39ea387.tar.gz otp-82c048745efcb5d811ec0489858b821ef39ea387.tar.bz2 otp-82c048745efcb5d811ec0489858b821ef39ea387.zip |
Replace erlang:binary_to_term() Erlang wrappers
Replace the 'erlang:binary_to_term/1' and 'erlang:binary_to_term/2'
Erlang wrappers taking care of failure after yield with management
of this in the hidden yield BIF.
Diffstat (limited to 'erts/preloaded/src/erlang.erl')
-rw-r--r-- | erts/preloaded/src/erlang.erl | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/erts/preloaded/src/erlang.erl b/erts/preloaded/src/erlang.erl index 1508eed9ee..2fe85287b6 100644 --- a/erts/preloaded/src/erlang.erl +++ b/erts/preloaded/src/erlang.erl @@ -361,25 +361,15 @@ binary_to_list(_Binary, _Start, _Stop) -> %% binary_to_term/1 -spec binary_to_term(Binary) -> term() when Binary :: ext_binary(). -binary_to_term(Binary) -> - %% This BIF may throw badarg while trapping - try - erts_internal:binary_to_term(Binary) - catch - error:Reason -> erlang:error(Reason,[Binary]) - end. +binary_to_term(_Binary) -> + erlang:nif_error(undefined). %% binary_to_term/2 -spec binary_to_term(Binary, Opts) -> term() when Binary :: ext_binary(), Opts :: [safe]. -binary_to_term(Binary, Opts) -> - %% This BIF may throw badarg while trapping - try - erts_internal:binary_to_term(Binary,Opts) - catch - error:Reason -> erlang:error(Reason,[Binary,Opts]) - end. +binary_to_term(_Binary, _Opts) -> + erlang:nif_error(undefined). %% bit_size/1 %% Shadowed by erl_bif_types: erlang:bit_size/1 |