aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/string.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2014-09-16 10:22:15 -0400
committerRuss Cox <rsc@golang.org>2014-09-16 10:22:15 -0400
commitd2574e2adb658b46ea2d8e22b3195cc14da1affe (patch)
tree58810c5dfaf8842fa3584530cc0c8ccfa1be6b62 /src/runtime/string.go
parent8d61334dd5b08c8076e343aa33197bd219cdf922 (diff)
downloadgo-d2574e2adb658b46ea2d8e22b3195cc14da1affe.tar.xz
runtime: remove duplicated Go constants
The C header files are the single point of truth: every C enum constant Foo is available to Go as _Foo. Remove or redirect duplicate Go declarations so they cannot be out of sync. Eventually we will need to put constants in Go, but for now having them be out of sync with C is too risky. These predate the build support for auto-generating Go constants from the C definitions. LGTM=iant R=iant CC=golang-codereviews https://golang.org/cl/141510043
Diffstat (limited to 'src/runtime/string.go')
-rw-r--r--src/runtime/string.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/runtime/string.go b/src/runtime/string.go
index c84f673427..0809f89bc1 100644
--- a/src/runtime/string.go
+++ b/src/runtime/string.go
@@ -225,7 +225,7 @@ func rawbyteslice(size int) (b []byte) {
// rawruneslice allocates a new rune slice. The rune slice is not zeroed.
func rawruneslice(size int) (b []rune) {
- if uintptr(size) > maxMem/4 {
+ if uintptr(size) > maxmem/4 {
gothrow("out of memory")
}
mem := goroundupsize(uintptr(size) * 4)