mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-10-30 12:52:26 -05:00
Update dependencies (#333)
This commit is contained in:
parent
ce22e03f9d
commit
182b4eea73
848 changed files with 377869 additions and 107280 deletions
17
vendor/modernc.org/sqlite/lib/mutex.go
generated
vendored
17
vendor/modernc.org/sqlite/lib/mutex.go
generated
vendored
|
|
@ -21,22 +21,25 @@ func init() {
|
|||
panic(fmt.Errorf("sqlite: thread safety configuration error"))
|
||||
}
|
||||
|
||||
varArgs := libc.Xmalloc(tls, types.Size_t(unsafe.Sizeof(uintptr(0))))
|
||||
if varArgs == 0 {
|
||||
panic(fmt.Errorf("cannot allocate memory"))
|
||||
}
|
||||
switch fmt.Sprintf("%s/%s", runtime.GOOS, runtime.GOARCH) {
|
||||
case "linux/amd64":
|
||||
// experimental pthreads support currently only on linux/amd64
|
||||
default:
|
||||
varArgs := libc.Xmalloc(tls, types.Size_t(unsafe.Sizeof(uintptr(0))))
|
||||
if varArgs == 0 {
|
||||
panic(fmt.Errorf("cannot allocate memory"))
|
||||
}
|
||||
|
||||
// experimental pthreads support currently only on linux/amd64
|
||||
if runtime.GOOS != "linux" || runtime.GOARCH != "amd64" {
|
||||
// int sqlite3_config(int, ...);
|
||||
if rc := Xsqlite3_config(tls, SQLITE_CONFIG_MUTEX, libc.VaList(varArgs, uintptr(unsafe.Pointer(&mutexMethods)))); rc != SQLITE_OK {
|
||||
p := Xsqlite3_errstr(tls, rc)
|
||||
str := libc.GoString(p)
|
||||
panic(fmt.Errorf("sqlite: failed to configure mutex methods: %v", str))
|
||||
}
|
||||
|
||||
libc.Xfree(tls, varArgs)
|
||||
}
|
||||
|
||||
libc.Xfree(tls, varArgs)
|
||||
tls.Close()
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue