summaryrefslogtreecommitdiffhomepage
path: root/pkg/marshal
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2021-04-17 01:00:38 +0000
committergVisor bot <gvisor-bot@google.com>2021-04-17 01:00:38 +0000
commitce460ce2f19e4b8c63f846d6258a0948a0766578 (patch)
treee029fa98ad0b419efa5ac5827746e6dc522f463f /pkg/marshal
parented4ffd6b8cc12ae502d8077843d53a630f5cf519 (diff)
parent0c3e8daf503e011f0ef3e2a1c6d8b6ffd946acab (diff)
Merge release-20210408.0-46-g0c3e8daf5 (automated)
Diffstat (limited to 'pkg/marshal')
-rw-r--r--pkg/marshal/primitive/primitive_abi_autogen_unsafe.go32
1 files changed, 16 insertions, 16 deletions
diff --git a/pkg/marshal/primitive/primitive_abi_autogen_unsafe.go b/pkg/marshal/primitive/primitive_abi_autogen_unsafe.go
index f35d5eea1..4ccc2a8c8 100644
--- a/pkg/marshal/primitive/primitive_abi_autogen_unsafe.go
+++ b/pkg/marshal/primitive/primitive_abi_autogen_unsafe.go
@@ -53,12 +53,12 @@ func (i *Int16) Packed() bool {
// MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
func (i *Int16) MarshalUnsafe(dst []byte) {
- gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(i), uintptr(len(dst)))
+ gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(i), uintptr(i.SizeBytes()))
}
// UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
func (i *Int16) UnmarshalUnsafe(src []byte) {
- gohacks.Memmove(unsafe.Pointer(i), unsafe.Pointer(&src[0]), uintptr(len(src)))
+ gohacks.Memmove(unsafe.Pointer(i), unsafe.Pointer(&src[0]), uintptr(i.SizeBytes()))
}
// CopyOutN implements marshal.Marshallable.CopyOutN.
@@ -220,12 +220,12 @@ func (i *Int32) Packed() bool {
// MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
func (i *Int32) MarshalUnsafe(dst []byte) {
- gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(i), uintptr(len(dst)))
+ gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(i), uintptr(i.SizeBytes()))
}
// UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
func (i *Int32) UnmarshalUnsafe(src []byte) {
- gohacks.Memmove(unsafe.Pointer(i), unsafe.Pointer(&src[0]), uintptr(len(src)))
+ gohacks.Memmove(unsafe.Pointer(i), unsafe.Pointer(&src[0]), uintptr(i.SizeBytes()))
}
// CopyOutN implements marshal.Marshallable.CopyOutN.
@@ -387,12 +387,12 @@ func (i *Int64) Packed() bool {
// MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
func (i *Int64) MarshalUnsafe(dst []byte) {
- gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(i), uintptr(len(dst)))
+ gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(i), uintptr(i.SizeBytes()))
}
// UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
func (i *Int64) UnmarshalUnsafe(src []byte) {
- gohacks.Memmove(unsafe.Pointer(i), unsafe.Pointer(&src[0]), uintptr(len(src)))
+ gohacks.Memmove(unsafe.Pointer(i), unsafe.Pointer(&src[0]), uintptr(i.SizeBytes()))
}
// CopyOutN implements marshal.Marshallable.CopyOutN.
@@ -554,12 +554,12 @@ func (i *Int8) Packed() bool {
// MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
func (i *Int8) MarshalUnsafe(dst []byte) {
- gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(i), uintptr(len(dst)))
+ gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(i), uintptr(i.SizeBytes()))
}
// UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
func (i *Int8) UnmarshalUnsafe(src []byte) {
- gohacks.Memmove(unsafe.Pointer(i), unsafe.Pointer(&src[0]), uintptr(len(src)))
+ gohacks.Memmove(unsafe.Pointer(i), unsafe.Pointer(&src[0]), uintptr(i.SizeBytes()))
}
// CopyOutN implements marshal.Marshallable.CopyOutN.
@@ -721,12 +721,12 @@ func (u *Uint16) Packed() bool {
// MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
func (u *Uint16) MarshalUnsafe(dst []byte) {
- gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(u), uintptr(len(dst)))
+ gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(u), uintptr(u.SizeBytes()))
}
// UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
func (u *Uint16) UnmarshalUnsafe(src []byte) {
- gohacks.Memmove(unsafe.Pointer(u), unsafe.Pointer(&src[0]), uintptr(len(src)))
+ gohacks.Memmove(unsafe.Pointer(u), unsafe.Pointer(&src[0]), uintptr(u.SizeBytes()))
}
// CopyOutN implements marshal.Marshallable.CopyOutN.
@@ -888,12 +888,12 @@ func (u *Uint32) Packed() bool {
// MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
func (u *Uint32) MarshalUnsafe(dst []byte) {
- gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(u), uintptr(len(dst)))
+ gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(u), uintptr(u.SizeBytes()))
}
// UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
func (u *Uint32) UnmarshalUnsafe(src []byte) {
- gohacks.Memmove(unsafe.Pointer(u), unsafe.Pointer(&src[0]), uintptr(len(src)))
+ gohacks.Memmove(unsafe.Pointer(u), unsafe.Pointer(&src[0]), uintptr(u.SizeBytes()))
}
// CopyOutN implements marshal.Marshallable.CopyOutN.
@@ -1055,12 +1055,12 @@ func (u *Uint64) Packed() bool {
// MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
func (u *Uint64) MarshalUnsafe(dst []byte) {
- gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(u), uintptr(len(dst)))
+ gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(u), uintptr(u.SizeBytes()))
}
// UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
func (u *Uint64) UnmarshalUnsafe(src []byte) {
- gohacks.Memmove(unsafe.Pointer(u), unsafe.Pointer(&src[0]), uintptr(len(src)))
+ gohacks.Memmove(unsafe.Pointer(u), unsafe.Pointer(&src[0]), uintptr(u.SizeBytes()))
}
// CopyOutN implements marshal.Marshallable.CopyOutN.
@@ -1222,12 +1222,12 @@ func (u *Uint8) Packed() bool {
// MarshalUnsafe implements marshal.Marshallable.MarshalUnsafe.
func (u *Uint8) MarshalUnsafe(dst []byte) {
- gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(u), uintptr(len(dst)))
+ gohacks.Memmove(unsafe.Pointer(&dst[0]), unsafe.Pointer(u), uintptr(u.SizeBytes()))
}
// UnmarshalUnsafe implements marshal.Marshallable.UnmarshalUnsafe.
func (u *Uint8) UnmarshalUnsafe(src []byte) {
- gohacks.Memmove(unsafe.Pointer(u), unsafe.Pointer(&src[0]), uintptr(len(src)))
+ gohacks.Memmove(unsafe.Pointer(u), unsafe.Pointer(&src[0]), uintptr(u.SizeBytes()))
}
// CopyOutN implements marshal.Marshallable.CopyOutN.