summaryrefslogtreecommitdiff
path: root/src/runtime/error.go
diff options
context:
space:
mode:
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 3ea93680c..0b40c702b 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
}