mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
[chore] Upgrade wasm-sqlite to v0.16.2 (#2997)
This commit is contained in:
4
vendor/github.com/tetratelabs/wazero/internal/engine/wazevo/wazevoapi/pool.go
generated
vendored
4
vendor/github.com/tetratelabs/wazero/internal/engine/wazevo/wazevoapi/pool.go
generated
vendored
@ -69,7 +69,7 @@ type IDedPool[T any] struct {
|
||||
|
||||
// NewIDedPool returns a new IDedPool.
|
||||
func NewIDedPool[T any](resetFn func(*T)) IDedPool[T] {
|
||||
return IDedPool[T]{pool: NewPool[T](resetFn)}
|
||||
return IDedPool[T]{pool: NewPool[T](resetFn), maxIDEncountered: -1}
|
||||
}
|
||||
|
||||
// GetOrAllocate returns the T with the given id.
|
||||
@ -97,7 +97,7 @@ func (p *IDedPool[T]) Get(id int) *T {
|
||||
// Reset resets the pool.
|
||||
func (p *IDedPool[T]) Reset() {
|
||||
p.pool.Reset()
|
||||
for i := range p.idToItems {
|
||||
for i := 0; i <= p.maxIDEncountered; i++ {
|
||||
p.idToItems[i] = nil
|
||||
}
|
||||
p.maxIDEncountered = -1
|
||||
|
Reference in New Issue
Block a user