unix: Add SetBase for IovecRemote

This is needed to portably set Base without platform-specific code.
This commit is contained in:
Tadeo Kondrak
2020-07-19 06:48:18 -06:00
committed by Tadeo Kondrak
parent 07e4a4840b
commit def9a9ee0d
10 changed files with 40 additions and 0 deletions

View File

@@ -380,6 +380,10 @@ func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint32(length)
}
func (iov *IovecRemote) SetBase(length uintptr) {
iov.Base = uint32(length)
}
func (iov *IovecRemote) SetLen(length int) {
iov.Len = uint32(length)
}

View File

@@ -171,6 +171,10 @@ func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint64(length)
}
func (iov *IovecRemote) SetBase(length uintptr) {
iov.Base = uint64(length)
}
func (iov *IovecRemote) SetLen(length int) {
iov.Len = uint64(length)
}

View File

@@ -260,6 +260,10 @@ func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint32(length)
}
func (iov *IovecRemote) SetBase(length uintptr) {
iov.Base = uint32(length)
}
func (iov *IovecRemote) SetLen(length int) {
iov.Len = uint32(length)
}

View File

@@ -206,6 +206,10 @@ func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint64(length)
}
func (iov *IovecRemote) SetBase(length uintptr) {
iov.Base = uint64(length)
}
func (iov *IovecRemote) SetLen(length int) {
iov.Len = uint64(length)
}

View File

@@ -216,6 +216,10 @@ func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint64(length)
}
func (iov *IovecRemote) SetBase(length uintptr) {
iov.Base = uint64(length)
}
func (iov *IovecRemote) SetLen(length int) {
iov.Len = uint64(length)
}

View File

@@ -228,6 +228,10 @@ func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint32(length)
}
func (iov *IovecRemote) SetBase(length uintptr) {
iov.Base = uint32(length)
}
func (iov *IovecRemote) SetLen(length int) {
iov.Len = uint32(length)
}

View File

@@ -99,6 +99,10 @@ func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint64(length)
}
func (iov *IovecRemote) SetBase(length uintptr) {
iov.Base = uint64(length)
}
func (iov *IovecRemote) SetLen(length int) {
iov.Len = uint64(length)
}

View File

@@ -187,6 +187,10 @@ func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint64(length)
}
func (iov *IovecRemote) SetBase(length uintptr) {
iov.Base = uint64(length)
}
func (iov *IovecRemote) SetLen(length int) {
iov.Len = uint64(length)
}

View File

@@ -128,6 +128,10 @@ func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint64(length)
}
func (iov *IovecRemote) SetBase(length uintptr) {
iov.Base = uint64(length)
}
func (iov *IovecRemote) SetLen(length int) {
iov.Len = uint64(length)
}

View File

@@ -115,6 +115,10 @@ func (cmsg *Cmsghdr) SetLen(length int) {
cmsg.Len = uint64(length)
}
func (iov *IovecRemote) SetBase(length uintptr) {
iov.Base = uint64(length)
}
func (iov *IovecRemote) SetLen(length int) {
iov.Len = uint64(length)
}