summaryrefslogtreecommitdiff
path: root/vendor/modernc.org/libc/libc_musl.go
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/modernc.org/libc/libc_musl.go')
-rw-r--r--vendor/modernc.org/libc/libc_musl.go23
1 files changed, 0 insertions, 23 deletions
diff --git a/vendor/modernc.org/libc/libc_musl.go b/vendor/modernc.org/libc/libc_musl.go
index a385f7eef..e2d5220a0 100644
--- a/vendor/modernc.org/libc/libc_musl.go
+++ b/vendor/modernc.org/libc/libc_musl.go
@@ -229,29 +229,6 @@ func CString(s string) (uintptr, error) {
return p, nil
}
-// GoBytes returns a byte slice from a C char* having length len bytes.
-func GoBytes(s uintptr, len int) []byte {
- return unsafe.Slice((*byte)(unsafe.Pointer(s)), len)
-}
-
-// GoString returns the value of a C string at s.
-func GoString(s uintptr) string {
- if s == 0 {
- return ""
- }
-
- var buf []byte
- for {
- b := *(*byte)(unsafe.Pointer(s))
- if b == 0 {
- return string(buf)
- }
-
- buf = append(buf, b)
- s++
- }
-}
-
func mustMalloc(sz Tsize_t) (r uintptr) {
if r = Xmalloc(nil, sz); r != 0 || sz == 0 {
return r