mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-15 02:03:02 -06: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
18
vendor/modernc.org/libc/libc_all.go
generated
vendored
18
vendor/modernc.org/libc/libc_all.go
generated
vendored
|
|
@ -32,3 +32,21 @@ func X__sync_sub_and_fetch[T constraints.Integer](t *TLS, p uintptr, v T) T {
|
|||
panic(todo(""))
|
||||
}
|
||||
}
|
||||
|
||||
// GoString returns the value of a C string at s.
|
||||
func GoString(s uintptr) string {
|
||||
if s == 0 {
|
||||
return ""
|
||||
}
|
||||
|
||||
p := s
|
||||
for *(*byte)(unsafe.Pointer(p)) != 0 {
|
||||
p++
|
||||
}
|
||||
return string(unsafe.Slice((*byte)(unsafe.Pointer(s)), p-s))
|
||||
}
|
||||
|
||||
// GoBytes returns a byte slice from a C char* having length len bytes.
|
||||
func GoBytes(s uintptr, len int) []byte {
|
||||
return unsafe.Slice((*byte)(unsafe.Pointer(s)), len)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue