Skip to content

Commit

Permalink
Merge branch 'bg/deprecations' into dev
Browse files Browse the repository at this point in the history
* bg/deprecations:
  test suites: Remove incidental use of deprecated concat_binary/1
  Postpone removal of concat_binary/1
  Remove deprecated lists:flat_length/1

OTP-8584 bg/deprecations
  • Loading branch information
Erlang/OTP committed Apr 19, 2010
2 parents bb6b926 + 1403571 commit 09ca69e
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 47 deletions.
48 changes: 24 additions & 24 deletions lib/compiler/test/inline_SUITE_data/decode1.erl
@@ -1,19 +1,19 @@
%%
%% %CopyrightBegin%
%%
%% Copyright Ericsson AB 2006-2009. All Rights Reserved.
%%
%%
%% Copyright Ericsson AB 2006-2010. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
%%
%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
%%
%%
%% %CopyrightEnd%
%%
%----------------------------------------------------------------------
Expand All @@ -37,25 +37,25 @@
FrameList = [89,128,0,8,132,0,26,133,133,0,38,148,94,
128,0,2,129,128,92,128,0,2,0,0,112,128,0,
10,194,69,0,0,0,0,0,18,52,95],
Frame = concat_binary([list_to_binary([89]),list_to_binary([128]),
list_to_binary([0]),list_to_binary([8]),
list_to_binary([132]),list_to_binary([0]),
list_to_binary([26]),list_to_binary([133]),
list_to_binary([133]),list_to_binary([0]),
list_to_binary([38]),list_to_binary([148]),
list_to_binary([94]),list_to_binary([128]),
list_to_binary([0]),list_to_binary([2]),
list_to_binary([129]),list_to_binary([128]),
list_to_binary([92]),list_to_binary([128]),
list_to_binary([0]),list_to_binary([2]),
list_to_binary([0]),list_to_binary([0]),
list_to_binary([112]),list_to_binary([128]),
list_to_binary([0]),list_to_binary([10]),
list_to_binary([194]),list_to_binary([69]),
list_to_binary([0]),list_to_binary([0]),
list_to_binary([0]),list_to_binary([0]),
list_to_binary([0]),list_to_binary([18]),
list_to_binary([52]),list_to_binary([95])]),
Frame = list_to_binary([list_to_binary([89]),list_to_binary([128]),
list_to_binary([0]),list_to_binary([8]),
list_to_binary([132]),list_to_binary([0]),
list_to_binary([26]),list_to_binary([133]),
list_to_binary([133]),list_to_binary([0]),
list_to_binary([38]),list_to_binary([148]),
list_to_binary([94]),list_to_binary([128]),
list_to_binary([0]),list_to_binary([2]),
list_to_binary([129]),list_to_binary([128]),
list_to_binary([92]),list_to_binary([128]),
list_to_binary([0]),list_to_binary([2]),
list_to_binary([0]),list_to_binary([0]),
list_to_binary([112]),list_to_binary([128]),
list_to_binary([0]),list_to_binary([10]),
list_to_binary([194]),list_to_binary([69]),
list_to_binary([0]),list_to_binary([0]),
list_to_binary([0]),list_to_binary([0]),
list_to_binary([0]),list_to_binary([18]),
list_to_binary([52]),list_to_binary([95])]),

R = loop(2,0,Frame),
{R,R =:= {0,[{ie,112,itu_t_standard,ignore,10,<<194,69,0,0,0,0,0,18,52,95>>},
Expand Down
2 changes: 1 addition & 1 deletion lib/crypto/test/crypto_SUITE.erl
Expand Up @@ -441,7 +441,7 @@ des_cbc_iter(Config) when is_list(Config) ->
?line Cipher1 = crypto:des_cbc_encrypt(Key, IVec, Plain1),
?line IVec2 = crypto:des_cbc_ivec(Cipher1),
?line Cipher2 = crypto:des_cbc_encrypt(Key, IVec2, Plain2),
?line Cipher = concat_binary([Cipher1, Cipher2]),
?line Cipher = list_to_binary([Cipher1, Cipher2]),
?line m(Cipher, hexstr2bin("e5c7cdde872bf27c43e934008c389c"
"0f683788499a7c05f6")).

Expand Down
21 changes: 6 additions & 15 deletions lib/stdlib/src/lists.erl
@@ -1,19 +1,19 @@
%%
%% %CopyrightBegin%
%%
%% Copyright Ericsson AB 1996-2009. All Rights Reserved.
%%
%%
%% Copyright Ericsson AB 1996-2010. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
%%
%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
%%
%%
%% %CopyrightEnd%
%%
-module(lists).
Expand All @@ -25,7 +25,7 @@
unzip/1, unzip3/1, zip/2, zip3/3, zipwith/3, zipwith3/4,
sort/1, merge/1, merge/2, rmerge/2, merge3/3, rmerge3/3,
usort/1, umerge/1, umerge3/3, umerge/2, rumerge3/3, rumerge/2,
concat/1, flatten/1, flatten/2, flat_length/1, flatlength/1,
concat/1, flatten/1, flatten/2, flatlength/1,
keydelete/3, keyreplace/4, keytake/3, keystore/4,
keysort/2, keymerge/3, rkeymerge/3, rukeymerge/3,
ukeysort/2, ukeymerge/3, keymap/3]).
Expand All @@ -40,8 +40,6 @@
mapfoldl/3,mapfoldr/3,foreach/2,takewhile/2,dropwhile/2,splitwith/2,
split/2]).

-deprecated([flat_length/1]).

%% member(X, L) -> (true | false)
%% test if X is a member of the list L
%% Now a BIF!
Expand Down Expand Up @@ -436,13 +434,6 @@ do_flatten([H|T], Tail) ->
do_flatten([], Tail) ->
Tail.

%% flat_length(List) (undocumented can be removed later)
%% Calculate the length of a list of lists.

-spec flat_length([_]) -> non_neg_integer().

flat_length(List) -> flatlength(List).

%% flatlength(List)
%% Calculate the length of a list of lists.

Expand Down
14 changes: 7 additions & 7 deletions lib/stdlib/src/otp_internal.erl
@@ -1,19 +1,19 @@
%%
%% %CopyrightBegin%
%%
%% Copyright Ericsson AB 1999-2009. All Rights Reserved.
%%
%%
%% Copyright Ericsson AB 1999-2010. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
%%
%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
%%
%%
%% %CopyrightEnd%
%%
-module(otp_internal).
Expand Down Expand Up @@ -322,7 +322,7 @@ obsolete_1(regexp, _, _) ->
{deprecated, "the regexp module is deprecated (will be removed in R15A); use the re module instead"};

obsolete_1(lists, flat_length, 1) ->
{deprecated,{lists,flatlength,1},"R14"};
{removed,{lists,flatlength,1},"R14"};

obsolete_1(ssh_sftp, connect, A) when 1 =< A, A =< 3 ->
{deprecated,{ssh_sftp,start_channel,A},"R14B"};
Expand All @@ -337,7 +337,7 @@ obsolete_1(ssl_pkix, decode_cert, A) when A =:= 1; A =:= 2 ->

%% Added in R13B04.
obsolete_1(erlang, concat_binary, 1) ->
{deprecated,{erlang,list_to_binary,1},"R14B"};
{deprecated,{erlang,list_to_binary,1},"R15B"};

obsolete_1(_, _, _) ->
no.
Expand Down

0 comments on commit 09ca69e

Please sign in to comment.