Update hcsshim to v0.12.0
Signed-off-by: Kirtana Ashok <kiashok@microsoft.com>
This commit is contained in:
7
vendor/github.com/Microsoft/hcsshim/internal/winapi/utils.go
generated
vendored
7
vendor/github.com/Microsoft/hcsshim/internal/winapi/utils.go
generated
vendored
@@ -4,7 +4,6 @@ package winapi
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"reflect"
|
||||
"syscall"
|
||||
"unsafe"
|
||||
|
||||
@@ -14,11 +13,7 @@ import (
|
||||
// Uint16BufferToSlice wraps a uint16 pointer-and-length into a slice
|
||||
// for easier interop with Go APIs
|
||||
func Uint16BufferToSlice(buffer *uint16, bufferLength int) (result []uint16) {
|
||||
hdr := (*reflect.SliceHeader)(unsafe.Pointer(&result))
|
||||
hdr.Data = uintptr(unsafe.Pointer(buffer))
|
||||
hdr.Cap = bufferLength
|
||||
hdr.Len = bufferLength
|
||||
|
||||
result = unsafe.Slice(buffer, bufferLength)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user