aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Bolinder <[email protected]>2013-01-23 14:48:56 +0100
committerHans Bolinder <[email protected]>2013-01-25 12:54:28 +0100
commit754ed6cd76c81ef749c0b34990ecbd519bd0690d (patch)
tree952d34903d8428259fda2d447a06ad3a2eddb4bc
parent81dd9fa1547dbd79dfde3af3421a7155c29537e7 (diff)
downloadotp-754ed6cd76c81ef749c0b34990ecbd519bd0690d.tar.gz
otp-754ed6cd76c81ef749c0b34990ecbd519bd0690d.tar.bz2
otp-754ed6cd76c81ef749c0b34990ecbd519bd0690d.zip
Remove one use of iolist_size/1 in io_lib_pretty.erl
In order to simplify the testing of Unicode atoms a minor adjustment has been made in io_lib_pretty. Unicode atoms will not be introduced until R18 but it may come in handy to be able to pretty-print such atoms in R16. This update affects ~p only; ~w already works.
-rw-r--r--lib/stdlib/src/io_lib_pretty.erl2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/stdlib/src/io_lib_pretty.erl b/lib/stdlib/src/io_lib_pretty.erl
index dbf6fd74e4..a8f610558a 100644
--- a/lib/stdlib/src/io_lib_pretty.erl
+++ b/lib/stdlib/src/io_lib_pretty.erl
@@ -385,7 +385,7 @@ print_length(<<_/bitstring>>=Bin, D, _RF, Enc) ->
end;
print_length(Term, _D, _RF, _Enc) ->
S = io_lib:write(Term),
- {S, iolist_size(S)}.
+ {S, lists:flatlength(S)}.
print_length_tuple(_Tuple, 1, _RF, _Enc) ->
{"{...}", 5};