mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-11-01 16:22:24 -05:00
update modernc.org/sqlite to v1.37.0-concurrrency-workaround (#3958)
This commit is contained in:
parent
9c31e213ca
commit
fdf23a91de
64 changed files with 1070 additions and 8220 deletions
26
vendor/modernc.org/libc/etc.go
generated
vendored
26
vendor/modernc.org/libc/etc.go
generated
vendored
|
|
@ -592,32 +592,6 @@ func roundup(n, to uintptr) uintptr {
|
|||
return n
|
||||
}
|
||||
|
||||
func GoString(s uintptr) string {
|
||||
if s == 0 {
|
||||
return ""
|
||||
}
|
||||
|
||||
var buf []byte
|
||||
for {
|
||||
b := *(*byte)(unsafe.Pointer(s))
|
||||
if b == 0 {
|
||||
return string(buf)
|
||||
}
|
||||
|
||||
buf = append(buf, b)
|
||||
s++
|
||||
}
|
||||
}
|
||||
|
||||
// GoBytes returns a byte slice from a C char* having length len bytes.
|
||||
func GoBytes(s uintptr, len int) []byte {
|
||||
if len == 0 {
|
||||
return nil
|
||||
}
|
||||
|
||||
return (*RawMem)(unsafe.Pointer(s))[:len:len]
|
||||
}
|
||||
|
||||
func Bool(v bool) bool { return v }
|
||||
|
||||
func Bool32(b bool) int32 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue