mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
runtime: improve atoi implementation
- Adds overflow checks - Adds parsing of negative integers - Adds boolean return value to signal parsing errors - Adds atoi32 for parsing of integers that fit in an int32 - Adds tests Handling of errors to provide error messages at the call sites is left to future CLs. Updates #17718 Change-Id: I3cacd0ab1230b9efc5404c68edae7304d39bcbc0 Reviewed-on: https://go-review.googlesource.com/32390 Reviewed-by: Ian Lance Taylor <iant@golang.org> Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
This commit is contained in:
parent
40aaf28312
commit
d7b34d5f29
6 changed files with 174 additions and 20 deletions
|
|
@ -32,6 +32,9 @@ var FuncPC = funcPC
|
|||
|
||||
var Fastlog2 = fastlog2
|
||||
|
||||
var Atoi = atoi
|
||||
var Atoi32 = atoi32
|
||||
|
||||
type LFNode struct {
|
||||
Next uint64
|
||||
Pushcnt uintptr
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue