Update dependencies
This commit is contained in:
27
vendor/modernc.org/libc/etc.go
generated
vendored
27
vendor/modernc.org/libc/etc.go
generated
vendored
@ -395,14 +395,17 @@ func cString(t *TLS, s string) uintptr { //TODO-
|
||||
return p
|
||||
}
|
||||
|
||||
// VaList fills a varargs list at p with args and returns uintptr(p). The list
|
||||
// must have been allocated by caller and it must not be in Go managed
|
||||
// memory, ie. it must be pinned. Caller is responsible for freeing the list.
|
||||
// VaList fills a varargs list at p with args and returns p. The list must
|
||||
// have been allocated by caller and it must not be in Go managed memory, ie.
|
||||
// it must be pinned. Caller is responsible for freeing the list.
|
||||
//
|
||||
// Individual arguments must be one of int, uint, int32, uint32, int64, uint64,
|
||||
// float64, uintptr or Intptr. Other types will panic.
|
||||
//
|
||||
// Note: The C translated to Go varargs ABI alignment for all types is 8 at all
|
||||
// This function supports code generated by ccgo/v3. For manually constructed
|
||||
// var args it's recommended to use the NewVaList function instead.
|
||||
//
|
||||
// Note: The C translated to Go varargs ABI alignment for all types is 8 on all
|
||||
// architectures.
|
||||
func VaList(p uintptr, args ...interface{}) (r uintptr) {
|
||||
if p&7 != 0 {
|
||||
@ -438,6 +441,22 @@ func VaList(p uintptr, args ...interface{}) (r uintptr) {
|
||||
return r
|
||||
}
|
||||
|
||||
// NewVaListN returns a newly allocated va_list for n items. The caller of
|
||||
// NewVaListN is responsible for freeing the va_list.
|
||||
func NewVaListN(n int) (va_list uintptr) {
|
||||
return Xmalloc(nil, types.Size_t(8*n))
|
||||
}
|
||||
|
||||
// NewVaList is like VaList but automatically allocates the correct amount of
|
||||
// memory for all of the items in args.
|
||||
//
|
||||
// The va_list return value is used to pass the constructed var args to var
|
||||
// args accepting functions. The caller of NewVaList is responsible for freeing
|
||||
// the va_list.
|
||||
func NewVaList(args ...interface{}) (va_list uintptr) {
|
||||
return VaList(NewVaListN(len(args)), args...)
|
||||
}
|
||||
|
||||
func VaInt32(app *uintptr) int32 {
|
||||
ap := *(*uintptr)(unsafe.Pointer(app))
|
||||
if ap == 0 {
|
||||
|
Reference in New Issue
Block a user