diff options
author | Rob Pike <r@golang.org> | 2009-04-17 00:08:24 -0700 |
---|---|---|
committer | Rob Pike <r@golang.org> | 2009-04-17 00:08:24 -0700 |
commit | 3696e3e558a5be76b8af9698ff0e56719e47ec59 (patch) | |
tree | c20f34ec6f9dea967a511f65b239c5e8637fec8f /src/lib/strconv/atof.go | |
parent | df02778ccda228c665179d0ff3dac77217ad6633 (diff) | |
download | golang-3696e3e558a5be76b8af9698ff0e56719e47ec59.tar.gz |
Step 1 of the Big Error Shift: make os.Error an interface and replace *os.Errors with os.Errors.
lib/template updated to use new setup; its clients also updated.
Step 2 will make os's error support internally much cleaner.
R=rsc
OCL=27586
CL=27586
Diffstat (limited to 'src/lib/strconv/atof.go')
-rw-r--r-- | src/lib/strconv/atof.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/lib/strconv/atof.go b/src/lib/strconv/atof.go index ec94b7c74..c257b2a33 100644 --- a/src/lib/strconv/atof.go +++ b/src/lib/strconv/atof.go @@ -321,7 +321,7 @@ func decimalAtof32(neg bool, d *decimal, trunc bool) (f float32, ok bool) { // If s is syntactically well-formed but is more than 1/2 ULP // away from the largest floating point number of the given size, // Atof32 returns f = ±Inf, err = os.ERANGE. -func Atof32(s string) (f float32, err *os.Error) { +func Atof32(s string) (f float32, err os.Error) { neg, d, trunc, ok := stringToDecimal(s); if !ok { return 0, os.EINVAL; @@ -342,7 +342,7 @@ func Atof32(s string) (f float32, err *os.Error) { // Atof64 converts the string s to a 64-bit floating-point number. // Except for the type of its result, its definition is the same as that // of Atof32. -func Atof64(s string) (f float64, err *os.Error) { +func Atof64(s string) (f float64, err os.Error) { neg, d, trunc, ok := stringToDecimal(s); if !ok { return 0, os.EINVAL; @@ -361,7 +361,7 @@ func Atof64(s string) (f float64, err *os.Error) { } // Atof is like Atof32 or Atof64, depending on the size of float. -func Atof(s string) (f float, err *os.Error) { +func Atof(s string) (f float, err os.Error) { if FloatSize == 32 { f1, err1 := Atof32(s); return float(f1), err1; |