mirror of
https://github.com/golang/sys.git
synced 2026-02-08 11:46:04 +03:00
Add TODO for unsafe.Slice
This commit is contained in:
@@ -34,6 +34,7 @@ func SysvShmAttach(id int, addr uintptr, flag int) ([]byte, error) {
|
||||
}
|
||||
|
||||
// Use unsafe to convert addr into a []byte.
|
||||
// TODO: convert to unsafe.Slice once we can assume Go 1.17
|
||||
var b []byte
|
||||
hdr := (*unsafeheader.Slice)(unsafe.Pointer(&b))
|
||||
hdr.Data = unsafe.Pointer(addr)
|
||||
|
||||
Reference in New Issue
Block a user