diff options
author | Hans Bolinder <[email protected]> | 2013-08-22 08:25:23 +0200 |
---|---|---|
committer | Hans Bolinder <[email protected]> | 2013-08-22 08:25:23 +0200 |
commit | 85cbdc050b60b0d6cebcde4bb9fa9a2499f770a7 (patch) | |
tree | c898f1d82001871ee851c7a8f2393e6599494485 /lib/stdlib/src/io_lib_fread.erl | |
parent | 420fe40a688f88cbcd6c716cc01a5f87908bc5ee (diff) | |
parent | a474bdfda30a3b6a520bf2be4b4550b251095703 (diff) | |
download | otp-85cbdc050b60b0d6cebcde4bb9fa9a2499f770a7.tar.gz otp-85cbdc050b60b0d6cebcde4bb9fa9a2499f770a7.tar.bz2 otp-85cbdc050b60b0d6cebcde4bb9fa9a2499f770a7.zip |
Merge branch 'hb/stdlib/correct_fread_spec/OTP-11261' into maint
* hb/stdlib/correct_fread_spec/OTP-11261:
Correct the specifications of io_lib:fread/2,3
Diffstat (limited to 'lib/stdlib/src/io_lib_fread.erl')
-rw-r--r-- | lib/stdlib/src/io_lib_fread.erl | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/stdlib/src/io_lib_fread.erl b/lib/stdlib/src/io_lib_fread.erl index 92a34995b8..491e1f40d7 100644 --- a/lib/stdlib/src/io_lib_fread.erl +++ b/lib/stdlib/src/io_lib_fread.erl @@ -41,9 +41,9 @@ Format :: string(), Return :: {'more', Continuation1 :: io_lib:continuation()} | {'done', Result, LeftOverChars :: string()}, - Result :: {'ok', InputList :: io_lib:chars()} + Result :: {'ok', InputList :: [io_lib:fread_item()]} | 'eof' - | {'error', {'read', What :: io_lib:fread_error()}}. + | {'error', {'fread', What :: io_lib:fread_error()}}. fread([], Chars, Format) -> %%io:format("FREAD: ~w `~s'~n", [Format,Chars]), @@ -101,11 +101,12 @@ fread_line(Format0, Line, N0, Results0, More, Newline) -> -spec fread(Format, String) -> Result when Format :: string(), String :: string(), - Result :: {'ok', InputList :: io_lib:chars(), LeftOverChars :: string()} + Result :: {'ok', InputList :: [io_lib:fread_item()], + LeftOverChars :: string()} | {'more', RestFormat :: string(), Nchars :: non_neg_integer(), InputStack :: io_lib:chars()} - | {'error', What :: term()}. + | {'error', {'fread', What :: io_lib:fread_error()}}. fread(Format, Line) -> fread(Format, Line, 0, []). |