aboutsummaryrefslogtreecommitdiff
path: root/vendor/golang.org/x/sys/windows/syscall.go
diff options
context:
space:
mode:
authorStefan Majewsky <majewsky@gmx.net>2023-10-25 14:40:11 +0200
committerStefan Majewsky <majewsky@gmx.net>2023-10-25 14:40:11 +0200
commit8ed9ced09964a0f70ffcadd0aa8d25c7bc339352 (patch)
tree4aefd3d5280837d2547a980995a3aa1a9eda4cb5 /vendor/golang.org/x/sys/windows/syscall.go
parentf308ca92d1631e579fbfe3b3da13c93709dc18a2 (diff)
downloadgofu-8ed9ced09964a0f70ffcadd0aa8d25c7bc339352.tar.gz
bump all dependencies to their latest versions
Diffstat (limited to 'vendor/golang.org/x/sys/windows/syscall.go')
-rw-r--r--vendor/golang.org/x/sys/windows/syscall.go11
1 files changed, 2 insertions, 9 deletions
diff --git a/vendor/golang.org/x/sys/windows/syscall.go b/vendor/golang.org/x/sys/windows/syscall.go
index 6122f55..8732cdb 100644
--- a/vendor/golang.org/x/sys/windows/syscall.go
+++ b/vendor/golang.org/x/sys/windows/syscall.go
@@ -2,6 +2,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
+//go:build windows
// +build windows
// Package windows contains an interface to the low-level operating system
@@ -29,8 +30,6 @@ import (
"strings"
"syscall"
"unsafe"
-
- "golang.org/x/sys/internal/unsafeheader"
)
// ByteSliceFromString returns a NUL-terminated slice of bytes
@@ -82,13 +81,7 @@ func BytePtrToString(p *byte) string {
ptr = unsafe.Pointer(uintptr(ptr) + 1)
}
- var s []byte
- h := (*unsafeheader.Slice)(unsafe.Pointer(&s))
- h.Data = unsafe.Pointer(p)
- h.Len = n
- h.Cap = n
-
- return string(s)
+ return string(unsafe.Slice(p, n))
}
// Single-word zero for use when we need a valid pointer to 0 bytes.