gotosocial/vendor/github.com/tetratelabs/wazero/internal/engine/wazevo/reflect.go
kim 1e7b32490d
[experiment] add alternative wasm sqlite3 implementation available via build-tag (#2863)
This allows for building GoToSocial with [SQLite transpiled to WASM](https://github.com/ncruces/go-sqlite3) and accessed through [Wazero](https://wazero.io/).
2024-05-27 17:46:15 +02:00

12 lines
219 B
Go

//go:build !tinygo
package wazevo
import "reflect"
// setSliceLimits sets both Cap and Len for the given reflected slice.
func setSliceLimits(s *reflect.SliceHeader, l, c uintptr) {
s.Len = int(l)
s.Cap = int(c)
}