mirror of
https://github.com/DNSCrypt/dnscrypt-proxy.git
synced 2025-04-05 22:27:37 +03:00
Update deps
This commit is contained in:
parent
beb002335f
commit
a47f7fe750
1943 changed files with 7896 additions and 330590 deletions
32
vendor/google.golang.org/protobuf/internal/impl/merge.go
generated
vendored
32
vendor/google.golang.org/protobuf/internal/impl/merge.go
generated
vendored
|
@ -9,8 +9,8 @@ import (
|
|||
"reflect"
|
||||
|
||||
"google.golang.org/protobuf/proto"
|
||||
pref "google.golang.org/protobuf/reflect/protoreflect"
|
||||
piface "google.golang.org/protobuf/runtime/protoiface"
|
||||
"google.golang.org/protobuf/reflect/protoreflect"
|
||||
"google.golang.org/protobuf/runtime/protoiface"
|
||||
)
|
||||
|
||||
type mergeOptions struct{}
|
||||
|
@ -20,17 +20,17 @@ func (o mergeOptions) Merge(dst, src proto.Message) {
|
|||
}
|
||||
|
||||
// merge is protoreflect.Methods.Merge.
|
||||
func (mi *MessageInfo) merge(in piface.MergeInput) piface.MergeOutput {
|
||||
func (mi *MessageInfo) merge(in protoiface.MergeInput) protoiface.MergeOutput {
|
||||
dp, ok := mi.getPointer(in.Destination)
|
||||
if !ok {
|
||||
return piface.MergeOutput{}
|
||||
return protoiface.MergeOutput{}
|
||||
}
|
||||
sp, ok := mi.getPointer(in.Source)
|
||||
if !ok {
|
||||
return piface.MergeOutput{}
|
||||
return protoiface.MergeOutput{}
|
||||
}
|
||||
mi.mergePointer(dp, sp, mergeOptions{})
|
||||
return piface.MergeOutput{Flags: piface.MergeComplete}
|
||||
return protoiface.MergeOutput{Flags: protoiface.MergeComplete}
|
||||
}
|
||||
|
||||
func (mi *MessageInfo) mergePointer(dst, src pointer, opts mergeOptions) {
|
||||
|
@ -64,7 +64,7 @@ func (mi *MessageInfo) mergePointer(dst, src pointer, opts mergeOptions) {
|
|||
continue
|
||||
}
|
||||
dx := (*dext)[num]
|
||||
var dv pref.Value
|
||||
var dv protoreflect.Value
|
||||
if dx.Type() == sx.Type() {
|
||||
dv = dx.Value()
|
||||
}
|
||||
|
@ -85,15 +85,15 @@ func (mi *MessageInfo) mergePointer(dst, src pointer, opts mergeOptions) {
|
|||
}
|
||||
}
|
||||
|
||||
func mergeScalarValue(dst, src pref.Value, opts mergeOptions) pref.Value {
|
||||
func mergeScalarValue(dst, src protoreflect.Value, opts mergeOptions) protoreflect.Value {
|
||||
return src
|
||||
}
|
||||
|
||||
func mergeBytesValue(dst, src pref.Value, opts mergeOptions) pref.Value {
|
||||
return pref.ValueOfBytes(append(emptyBuf[:], src.Bytes()...))
|
||||
func mergeBytesValue(dst, src protoreflect.Value, opts mergeOptions) protoreflect.Value {
|
||||
return protoreflect.ValueOfBytes(append(emptyBuf[:], src.Bytes()...))
|
||||
}
|
||||
|
||||
func mergeListValue(dst, src pref.Value, opts mergeOptions) pref.Value {
|
||||
func mergeListValue(dst, src protoreflect.Value, opts mergeOptions) protoreflect.Value {
|
||||
dstl := dst.List()
|
||||
srcl := src.List()
|
||||
for i, llen := 0, srcl.Len(); i < llen; i++ {
|
||||
|
@ -102,29 +102,29 @@ func mergeListValue(dst, src pref.Value, opts mergeOptions) pref.Value {
|
|||
return dst
|
||||
}
|
||||
|
||||
func mergeBytesListValue(dst, src pref.Value, opts mergeOptions) pref.Value {
|
||||
func mergeBytesListValue(dst, src protoreflect.Value, opts mergeOptions) protoreflect.Value {
|
||||
dstl := dst.List()
|
||||
srcl := src.List()
|
||||
for i, llen := 0, srcl.Len(); i < llen; i++ {
|
||||
sb := srcl.Get(i).Bytes()
|
||||
db := append(emptyBuf[:], sb...)
|
||||
dstl.Append(pref.ValueOfBytes(db))
|
||||
dstl.Append(protoreflect.ValueOfBytes(db))
|
||||
}
|
||||
return dst
|
||||
}
|
||||
|
||||
func mergeMessageListValue(dst, src pref.Value, opts mergeOptions) pref.Value {
|
||||
func mergeMessageListValue(dst, src protoreflect.Value, opts mergeOptions) protoreflect.Value {
|
||||
dstl := dst.List()
|
||||
srcl := src.List()
|
||||
for i, llen := 0, srcl.Len(); i < llen; i++ {
|
||||
sm := srcl.Get(i).Message()
|
||||
dm := proto.Clone(sm.Interface()).ProtoReflect()
|
||||
dstl.Append(pref.ValueOfMessage(dm))
|
||||
dstl.Append(protoreflect.ValueOfMessage(dm))
|
||||
}
|
||||
return dst
|
||||
}
|
||||
|
||||
func mergeMessageValue(dst, src pref.Value, opts mergeOptions) pref.Value {
|
||||
func mergeMessageValue(dst, src protoreflect.Value, opts mergeOptions) protoreflect.Value {
|
||||
opts.Merge(dst.Message().Interface(), src.Message().Interface())
|
||||
return dst
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue