diff options
| author | Keith Randall <khr@golang.org> | 2014-12-28 23:16:32 -0800 |
|---|---|---|
| committer | Keith Randall <khr@golang.org> | 2014-12-29 15:18:29 +0000 |
| commit | 0bb8fc66142bae953c0374a292eeab12440af3cb (patch) | |
| tree | c65ed92ac5add7fa4b8fe09d37f717938f087e83 /src/runtime/string.go | |
| parent | ab0535ae3fb45ba734d47542cc4845f27f708d1b (diff) | |
| download | go-0bb8fc66142bae953c0374a292eeab12440af3cb.tar.xz | |
runtime: remove go prefix from a few routines
They are no longer needed now that C is gone.
goatoi -> atoi
gofuncname/funcname -> funcname/cfuncname
goroundupsize -> already existing roundupsize
Change-Id: I278bc33d279e1fdc5e8a2a04e961c4c1573b28c7
Reviewed-on: https://go-review.googlesource.com/2154
Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
Reviewed-by: Minux Ma <minux@golang.org>
Diffstat (limited to 'src/runtime/string.go')
| -rw-r--r-- | src/runtime/string.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/runtime/string.go b/src/runtime/string.go index 78c4cb3e5e..96f9579624 100644 --- a/src/runtime/string.go +++ b/src/runtime/string.go @@ -207,7 +207,7 @@ func rawstring(size int) (s string, b []byte) { // rawbyteslice allocates a new byte slice. The byte slice is not zeroed. func rawbyteslice(size int) (b []byte) { - cap := goroundupsize(uintptr(size)) + cap := roundupsize(uintptr(size)) p := mallocgc(cap, nil, flagNoScan|flagNoZero) if cap != uintptr(size) { memclr(add(p, uintptr(size)), cap-uintptr(size)) @@ -224,7 +224,7 @@ func rawruneslice(size int) (b []rune) { if uintptr(size) > _MaxMem/4 { throw("out of memory") } - mem := goroundupsize(uintptr(size) * 4) + mem := roundupsize(uintptr(size) * 4) p := mallocgc(mem, nil, flagNoScan|flagNoZero) if mem != uintptr(size)*4 { memclr(add(p, uintptr(size)*4), mem-uintptr(size)*4) @@ -290,7 +290,7 @@ func hasprefix(s, t string) bool { return len(s) >= len(t) && s[:len(t)] == t } -func goatoi(s string) int { +func atoi(s string) int { n := 0 for len(s) > 0 && '0' <= s[0] && s[0] <= '9' { n = n*10 + int(s[0]) - '0' |
