From 97f8386af7907191cefbbfa26a3bd01c4ec95655 Mon Sep 17 00:00:00 2001 From: Russ Cox Date: Wed, 3 Sep 2014 13:02:48 -0400 Subject: runtime: convert symtab.c into symtab.go Because symtab.c was partially converted before, the diffs are not terribly useful. The earlier conversion was trying to refactor or clean up the code in addition to doing the translation. It also made a mistake by redefining Func to be something users could overwrite. I undid those changes, making symtab.go a more literal line-for-line translation of symtab.c instead. LGTM=josharian R=golang-codereviews, dave, bradfitz, josharian CC=golang-codereviews, iant, khr, r https://golang.org/cl/140880043 --- src/pkg/runtime/string.go | 13 ------------- 1 file changed, 13 deletions(-) (limited to 'src/pkg/runtime/string.go') diff --git a/src/pkg/runtime/string.go b/src/pkg/runtime/string.go index 1cefad9671..91f33db118 100644 --- a/src/pkg/runtime/string.go +++ b/src/pkg/runtime/string.go @@ -145,19 +145,6 @@ type stringStruct struct { len int } -func cstringToGo(str unsafe.Pointer) (s string) { - i := 0 - for ; ; i++ { - if *(*byte)(unsafe.Pointer(uintptr(str) + uintptr(i))) == 0 { - break - } - } - t := (*stringStruct)(unsafe.Pointer(&s)) - t.str = unsafe.Pointer(str) - t.len = i - return -} - func intstring(v int64) string { s, b := rawstring(4) n := runetochar(b, rune(v)) -- cgit v1.3