From 67100809b399b60e58490fa8b1c0a72be75ac820 Mon Sep 17 00:00:00 2001 From: kim Date: Sun, 10 Aug 2025 15:05:54 +0200 Subject: [chore] update dependencies (#4361) - codeberg.org/gruf/go-kv/v2 v2.0.5 => v2.0.6 - github.com/coreos/go-oidc/v3 v3.14.1 => v3.15.0 - github.com/miekg/dns v1.1.67 => v1.1.68 - github.com/tdewolff/minify/v2 v2.23.9 => v2.23.11 - github.com/yuin/goldmark v1.7.12 => v1.7.13 - golang.org/x/crypto v0.40.0 => v0.41.0 - golang.org/x/image v0.29.0 => v0.30.0 - golang.org/x/net v0.42.0 => v0.43.0 - golang.org/x/sys v0.34.0 => v0.35.0 - golang.org/x/text v0.27.0 => v0.28.0 - modernc.org/sqlite v1.38.0 => v1.38.2 Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4361 Co-authored-by: kim Co-committed-by: kim --- vendor/codeberg.org/gruf/go-kv/v2/LICENSE | 2 +- vendor/codeberg.org/gruf/go-kv/v2/format/abi.go | 244 +-------------------- vendor/codeberg.org/gruf/go-kv/v2/format/array.go | 66 +++--- vendor/codeberg.org/gruf/go-kv/v2/format/cache.go | 60 +++++ vendor/codeberg.org/gruf/go-kv/v2/format/format.go | 104 +++++---- vendor/codeberg.org/gruf/go-kv/v2/format/map.go | 60 ++--- .../codeberg.org/gruf/go-kv/v2/format/methods.go | 115 +++++++--- .../codeberg.org/gruf/go-kv/v2/format/pointer.go | 28 +-- vendor/codeberg.org/gruf/go-kv/v2/format/slice.go | 36 +-- vendor/codeberg.org/gruf/go-kv/v2/format/struct.go | 34 +-- vendor/codeberg.org/gruf/go-kv/v2/format/type.go | 83 ++----- vendor/codeberg.org/gruf/go-xunsafe/LICENSE | 9 + vendor/codeberg.org/gruf/go-xunsafe/README.md | 3 + vendor/codeberg.org/gruf/go-xunsafe/abi.go | 109 +++++++++ vendor/codeberg.org/gruf/go-xunsafe/reflect.go | 157 +++++++++++++ vendor/codeberg.org/gruf/go-xunsafe/types.go | 49 +++++ 16 files changed, 667 insertions(+), 492 deletions(-) create mode 100644 vendor/codeberg.org/gruf/go-kv/v2/format/cache.go create mode 100644 vendor/codeberg.org/gruf/go-xunsafe/LICENSE create mode 100644 vendor/codeberg.org/gruf/go-xunsafe/README.md create mode 100644 vendor/codeberg.org/gruf/go-xunsafe/abi.go create mode 100644 vendor/codeberg.org/gruf/go-xunsafe/reflect.go create mode 100644 vendor/codeberg.org/gruf/go-xunsafe/types.go (limited to 'vendor/codeberg.org') diff --git a/vendor/codeberg.org/gruf/go-kv/v2/LICENSE b/vendor/codeberg.org/gruf/go-kv/v2/LICENSE index b7c4417ac..d6f08d0ab 100644 --- a/vendor/codeberg.org/gruf/go-kv/v2/LICENSE +++ b/vendor/codeberg.org/gruf/go-kv/v2/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2021 gruf +Copyright (c) gruf Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: diff --git a/vendor/codeberg.org/gruf/go-kv/v2/format/abi.go b/vendor/codeberg.org/gruf/go-kv/v2/format/abi.go index b68d3cb73..16b9c8cb9 100644 --- a/vendor/codeberg.org/gruf/go-kv/v2/format/abi.go +++ b/vendor/codeberg.org/gruf/go-kv/v2/format/abi.go @@ -5,88 +5,10 @@ package format import ( "reflect" "unsafe" -) -const ( - // see: go/src/internal/abi/type.go - abi_KindDirectIface uint8 = 1 << 5 - abi_KindMask uint8 = (1 << 5) - 1 + "codeberg.org/gruf/go-xunsafe" ) -// abi_Type is a copy of the memory layout of abi.Type{}. -// -// see: go/src/internal/abi/type.go -type abi_Type struct { - _ uintptr - PtrBytes uintptr - _ uint32 - _ uint8 - _ uint8 - _ uint8 - Kind_ uint8 - _ func(unsafe.Pointer, unsafe.Pointer) bool - _ *byte - _ int32 - _ int32 -} - -// abi_EmptyInterface is a copy of the memory layout of abi.EmptyInterface{}, -// which is to say also the memory layout of any method-less interface. -// -// see: go/src/internal/abi/iface.go -type abi_EmptyInterface struct { - Type *abi_Type - Data unsafe.Pointer -} - -// abi_NonEmptyInterface is a copy of the memory layout of abi.NonEmptyInterface{}, -// which is to say also the memory layout of any interface containing method(s). -// -// see: go/src/internal/abi/iface.go on 1.25+ -// see: go/src/reflect/value.go on 1.24 -type abi_NonEmptyInterface struct { - ITab uintptr - Data unsafe.Pointer -} - -// see: go/src/internal/abi/type.go Type.Kind() -func abi_Type_Kind(t reflect.Type) uint8 { - iface := (*abi_NonEmptyInterface)(unsafe.Pointer(&t)) - atype := (*abi_Type)(unsafe.Pointer(iface.Data)) - return atype.Kind_ & abi_KindMask -} - -// see: go/src/internal/abi/type.go Type.IfaceIndir() -func abi_Type_IfaceIndir(t reflect.Type) bool { - iface := (*abi_NonEmptyInterface)(unsafe.Pointer(&t)) - atype := (*abi_Type)(unsafe.Pointer(iface.Data)) - return atype.Kind_&abi_KindDirectIface == 0 -} - -// pack_iface packs a new reflect.nonEmptyInterface{} using shielded -// itab and data pointer, returning a pointer for caller casting. -func pack_iface(itab uintptr, word unsafe.Pointer) unsafe.Pointer { - return unsafe.Pointer(&abi_NonEmptyInterface{ - ITab: itab, - Data: word, - }) -} - -// get_iface_ITab generates a new value of given type, -// casts it to the generic param interface type, and -// returns the .itab portion of the reflect.nonEmptyInterface{}. -// this is useful for later calls to pack_iface for known type. -func get_iface_ITab[I any](t reflect.Type) uintptr { - s := reflect.New(t).Elem().Interface().(I) - i := (*abi_NonEmptyInterface)(unsafe.Pointer(&s)) - return i.ITab -} - -// unpack_eface returns the .Data portion of an abi.EmptyInterface{}. -func unpack_eface(a any) unsafe.Pointer { - return (*abi_EmptyInterface)(unsafe.Pointer((&a))).Data -} - // add returns the ptr addition of starting ptr and a delta. func add(ptr unsafe.Pointer, delta uintptr) unsafe.Pointer { return unsafe.Pointer(uintptr(ptr) + delta) @@ -97,167 +19,7 @@ func typeof[T any]() reflect.Type { return reflect.TypeFor[T]() } -// see: go/src/reflect/value.go -type reflect_flag uintptr - const ( - // see: go/src/reflect/value.go - reflect_flagKindWidth = 5 // there are 27 kinds - reflect_flagKindMask reflect_flag = 1<