summaryrefslogtreecommitdiff
path: root/vendor/github.com/goccy/go-json/internal/decoder/array.go
diff options
context:
space:
mode:
authorLibravatar dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>2023-06-01 22:20:16 +0100
committerLibravatar GitHub <noreply@github.com>2023-06-01 22:20:16 +0100
commit55aacaf4b07c1921061245cbaa3d307e97cf3c29 (patch)
treed969c5d9728566de1e794e19c5b19d3b660f790e /vendor/github.com/goccy/go-json/internal/decoder/array.go
parent[chore/frontend] refactor header templating, add apple-touch-icon (#1850) (diff)
downloadgotosocial-55aacaf4b07c1921061245cbaa3d307e97cf3c29.tar.xz
[chore]: Bump github.com/gin-gonic/gin from 1.9.0 to 1.9.1 (#1855)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Diffstat (limited to 'vendor/github.com/goccy/go-json/internal/decoder/array.go')
-rw-r--r--vendor/github.com/goccy/go-json/internal/decoder/array.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/vendor/github.com/goccy/go-json/internal/decoder/array.go b/vendor/github.com/goccy/go-json/internal/decoder/array.go
index 8ef91cfa1..4b23ed43f 100644
--- a/vendor/github.com/goccy/go-json/internal/decoder/array.go
+++ b/vendor/github.com/goccy/go-json/internal/decoder/array.go
@@ -19,7 +19,9 @@ type arrayDecoder struct {
}
func newArrayDecoder(dec Decoder, elemType *runtime.Type, alen int, structName, fieldName string) *arrayDecoder {
- zeroValue := *(*unsafe.Pointer)(unsafe_New(elemType))
+ // workaround to avoid checkptr errors. cannot use `*(*unsafe.Pointer)(unsafe_New(elemType))` directly.
+ zeroValuePtr := unsafe_New(elemType)
+ zeroValue := **(**unsafe.Pointer)(unsafe.Pointer(&zeroValuePtr))
return &arrayDecoder{
valueDecoder: dec,
elemType: elemType,