aboutsummaryrefslogtreecommitdiffstats
path: root/erts/preloaded/src
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
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')
-rw-r--r--erts/preloaded/src/erlang.erl18
-rw-r--r--erts/preloaded/src/erts_internal.erl12
2 files changed, 4 insertions, 26 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
diff --git a/erts/preloaded/src/erts_internal.erl b/erts/preloaded/src/erts_internal.erl
index 764d7730aa..2c5bd82cf0 100644
--- a/erts/preloaded/src/erts_internal.erl
+++ b/erts/preloaded/src/erts_internal.erl
@@ -29,7 +29,6 @@
-module(erts_internal).
-export([await_port_send_result/3]).
--export([binary_to_term/1, binary_to_term/2]).
-export([cmp_term/2]).
-export([map_to_tuple_keys/1]).
-export([port_command/3, port_connect/2, port_close/1,
@@ -162,17 +161,6 @@ request_system_task(_Pid, _Prio, _Request) ->
check_process_code(_Module, _OptionList) ->
erlang:nif_error(undefined).
--spec binary_to_term(Binary) -> term() when
- Binary :: binary().
-binary_to_term(_Binary) ->
- erlang:nif_error(undefined).
-
--spec binary_to_term(Binary, Opts) -> term() when
- Binary :: binary(),
- Opts :: [safe].
-binary_to_term(_Binary, _Opts) ->
- erlang:nif_error(undefined).
-
%% term compare where integer() < float() = true
-spec cmp_term(A,B) -> Result when