aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/error.go
diff options
context:
space:
mode:
authorRuss Cox <rsc@golang.org>2014-10-03 12:22:19 -0400
committerRuss Cox <rsc@golang.org>2014-10-03 12:22:19 -0400
commit904ec0098137f742e0dd96da3bc033d6a0b615d1 (patch)
tree6a05a91443927524fcb78ac82df0142d8e6ae71f /src/runtime/error.go
parentd42328c9f749140adf947833e0381fc639c32737 (diff)
parentc65a47f890e33eeed6ee9d8b6d965a5534fb6e0e (diff)
downloadgo-904ec0098137f742e0dd96da3bc033d6a0b615d1.tar.xz
[dev.garbage] merge default into dev.garbage
Diffstat (limited to 'src/runtime/error.go')
-rw-r--r--src/runtime/error.go22
1 files changed, 0 insertions, 22 deletions
diff --git a/src/runtime/error.go b/src/runtime/error.go
index 3ea93680ce..0b40c702b0 100644
--- a/src/runtime/error.go
+++ b/src/runtime/error.go
@@ -71,28 +71,6 @@ func (e errorString) Error() string {
return "runtime error: " + string(e)
}
-// For calling from C.
-func newErrorString(s string, ret *interface{}) {
- *ret = errorString(s)
-}
-
-// An errorCString represents a runtime error described by a single C string.
-// Not "type errorCString unsafe.Pointer" because of http://golang.org/issue/7084.
-// Not uintptr because we want to avoid an allocation if interfaces can't hold
-// uintptrs directly (and cstr _is_ a pointer).
-type errorCString struct{ cstr unsafe.Pointer }
-
-func (e errorCString) RuntimeError() {}
-
-func (e errorCString) Error() string {
- return "runtime error: " + gostringnocopy((*byte)(e.cstr))
-}
-
-// For calling from C.
-func newErrorCString(s unsafe.Pointer, ret *interface{}) {
- *ret = errorCString{s}
-}
-
type stringer interface {
String() string
}