aboutsummaryrefslogtreecommitdiffstats
path: root/erts/preloaded/src/erlang.erl
diff options
context:
space:
mode:
authorRickard Green <[email protected]>2014-06-06 01:47:49 +0200
committerRickard Green <[email protected]>2014-06-06 01:47:49 +0200
commitfd9ded54a9d1d3c1df3c44c0f5eed0be25f85a82 (patch)
tree7238e0341da395b7b1ea45788697de764bdbc009 /erts/preloaded/src/erlang.erl
parentcb252aecf7da924e2959dadd390f1bbd320b2eb8 (diff)
parent82c048745efcb5d811ec0489858b821ef39ea387 (diff)
downloadotp-fd9ded54a9d1d3c1df3c44c0f5eed0be25f85a82.tar.gz
otp-fd9ded54a9d1d3c1df3c44c0f5eed0be25f85a82.tar.bz2
otp-fd9ded54a9d1d3c1df3c44c0f5eed0be25f85a82.zip
Merge branch 'rickard/binary_to_term_error/OTP-11931' into maint
* rickard/binary_to_term_error/OTP-11931: Replace erlang:binary_to_term() Erlang wrappers Conflicts: erts/preloaded/ebin/erts_internal.beam
Diffstat (limited to 'erts/preloaded/src/erlang.erl')
-rw-r--r--erts/preloaded/src/erlang.erl18
1 files changed, 4 insertions, 14 deletions
diff --git a/erts/preloaded/src/erlang.erl b/erts/preloaded/src/erlang.erl
index af43be10c6..f669dafccd 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