mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-12-14 14:57:28 -06:00
update go-sqlite3 to v0.18.0 (#3204)
This commit is contained in:
parent
09f24e0446
commit
586639ccf0
36 changed files with 645 additions and 143 deletions
19
vendor/github.com/ncruces/go-sqlite3/vfs/shm_bsd.go
generated
vendored
19
vendor/github.com/ncruces/go-sqlite3/vfs/shm_bsd.go
generated
vendored
|
|
@ -72,28 +72,28 @@ func (s *vfsShm) Close() error {
|
|||
return nil
|
||||
}
|
||||
|
||||
// Unlock everything.
|
||||
s.shmLock(0, _SHM_NLOCK, _SHM_UNLOCK)
|
||||
|
||||
vfsShmFilesMtx.Lock()
|
||||
defer vfsShmFilesMtx.Unlock()
|
||||
|
||||
// Unlock everything.
|
||||
s.shmLock(0, _SHM_NLOCK, _SHM_UNLOCK)
|
||||
|
||||
// Decrease reference count.
|
||||
if s.vfsShmFile.refs > 1 {
|
||||
s.vfsShmFile.refs--
|
||||
s.vfsShmFile = nil
|
||||
return nil
|
||||
}
|
||||
|
||||
err := s.File.Close()
|
||||
for i, g := range vfsShmFiles {
|
||||
if g == s.vfsShmFile {
|
||||
vfsShmFiles[i] = nil
|
||||
break
|
||||
s.vfsShmFile = nil
|
||||
return err
|
||||
}
|
||||
}
|
||||
|
||||
err := s.File.Close()
|
||||
s.vfsShmFile = nil
|
||||
return err
|
||||
panic(util.AssertErr())
|
||||
}
|
||||
|
||||
func (s *vfsShm) shmOpen() (rc _ErrorCode) {
|
||||
|
|
@ -234,6 +234,8 @@ func (s *vfsShm) shmLock(offset, n int32, flags _ShmFlag) _ErrorCode {
|
|||
s.vfsShmFile.lock[i] = -1
|
||||
s.lock[i] = true
|
||||
}
|
||||
default:
|
||||
panic(util.AssertErr())
|
||||
}
|
||||
|
||||
return _OK
|
||||
|
|
@ -256,5 +258,4 @@ func (s *vfsShm) shmUnmap(delete bool) {
|
|||
os.Remove(s.path)
|
||||
}
|
||||
s.Close()
|
||||
s.vfsShmFile = nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue