1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-19 00:38:36 +00:00

update golang libraries (#15258) (#15259)

This commit is contained in:
techknowlogick
2021-04-03 04:42:18 -04:00
committed by GitHub
parent 8ec7beb9f4
commit 33c4e246fe
109 changed files with 4196 additions and 3174 deletions

View File

@@ -111,7 +111,9 @@ func NewProcThreadAttributeList(maxAttrCount uint32) (*ProcThreadAttributeList,
}
return nil, err
}
al := (*ProcThreadAttributeList)(unsafe.Pointer(&make([]byte, size)[0]))
const psize = unsafe.Sizeof(uintptr(0))
// size is guaranteed to be ≥1 by InitializeProcThreadAttributeList.
al := (*ProcThreadAttributeList)(unsafe.Pointer(&make([]unsafe.Pointer, (size+psize-1)/psize)[0]))
err = initializeProcThreadAttributeList(al, maxAttrCount, 0, &size)
if err != nil {
return nil, err
@@ -120,8 +122,8 @@ func NewProcThreadAttributeList(maxAttrCount uint32) (*ProcThreadAttributeList,
}
// Update modifies the ProcThreadAttributeList using UpdateProcThreadAttribute.
func (al *ProcThreadAttributeList) Update(attribute uintptr, flags uint32, value unsafe.Pointer, size uintptr, prevValue uintptr, returnedSize *uintptr) error {
return updateProcThreadAttribute(al, flags, attribute, uintptr(value), size, prevValue, returnedSize)
func (al *ProcThreadAttributeList) Update(attribute uintptr, flags uint32, value unsafe.Pointer, size uintptr, prevValue unsafe.Pointer, returnedSize *uintptr) error {
return updateProcThreadAttribute(al, flags, attribute, value, size, prevValue, returnedSize)
}
// Delete frees ProcThreadAttributeList's resources.