update go-sqlite3 => v0.20.0 (#3483)

This commit is contained in:
kim
2024-10-25 16:09:18 +00:00
committed by GitHub
parent d8a83860bc
commit 51cb6cae16
41 changed files with 841 additions and 263 deletions

View File

@ -4,6 +4,8 @@ import (
"context"
"github.com/tetratelabs/wazero/experimental"
"github.com/ncruces/go-sqlite3/internal/alloc"
)
type moduleKey struct{}
@ -14,7 +16,7 @@ type moduleState struct {
func NewContext(ctx context.Context) context.Context {
state := new(moduleState)
ctx = withAllocator(ctx)
ctx = experimental.WithMemoryAllocator(ctx, experimental.MemoryAllocatorFunc(alloc.NewMemory))
ctx = experimental.WithCloseNotifier(ctx, state)
ctx = context.WithValue(ctx, moduleKey{}, state)
return ctx