mirror of
https://github.com/ceph/ceph-csi.git
synced 2025-06-14 18:53:35 +00:00
rebase: bump google.golang.org/protobuf from 1.35.2 to 1.36.0
Bumps google.golang.org/protobuf from 1.35.2 to 1.36.0. --- updated-dependencies: - dependency-name: google.golang.org/protobuf dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
This commit is contained in:
committed by
mergify[bot]
parent
431e9231d2
commit
ca1ccdd9bf
56
vendor/google.golang.org/protobuf/internal/impl/decode.go
generated
vendored
56
vendor/google.golang.org/protobuf/internal/impl/decode.go
generated
vendored
@ -34,6 +34,8 @@ func (o unmarshalOptions) Options() proto.UnmarshalOptions {
|
||||
AllowPartial: true,
|
||||
DiscardUnknown: o.DiscardUnknown(),
|
||||
Resolver: o.resolver,
|
||||
|
||||
NoLazyDecoding: o.NoLazyDecoding(),
|
||||
}
|
||||
}
|
||||
|
||||
@ -41,13 +43,26 @@ func (o unmarshalOptions) DiscardUnknown() bool {
|
||||
return o.flags&protoiface.UnmarshalDiscardUnknown != 0
|
||||
}
|
||||
|
||||
func (o unmarshalOptions) IsDefault() bool {
|
||||
return o.flags == 0 && o.resolver == protoregistry.GlobalTypes
|
||||
func (o unmarshalOptions) AliasBuffer() bool { return o.flags&protoiface.UnmarshalAliasBuffer != 0 }
|
||||
func (o unmarshalOptions) Validated() bool { return o.flags&protoiface.UnmarshalValidated != 0 }
|
||||
func (o unmarshalOptions) NoLazyDecoding() bool {
|
||||
return o.flags&protoiface.UnmarshalNoLazyDecoding != 0
|
||||
}
|
||||
|
||||
func (o unmarshalOptions) CanBeLazy() bool {
|
||||
if o.resolver != protoregistry.GlobalTypes {
|
||||
return false
|
||||
}
|
||||
// We ignore the UnmarshalInvalidateSizeCache even though it's not in the default set
|
||||
return (o.flags & ^(protoiface.UnmarshalAliasBuffer | protoiface.UnmarshalValidated | protoiface.UnmarshalCheckRequired)) == 0
|
||||
}
|
||||
|
||||
var lazyUnmarshalOptions = unmarshalOptions{
|
||||
resolver: protoregistry.GlobalTypes,
|
||||
depth: protowire.DefaultRecursionLimit,
|
||||
|
||||
flags: protoiface.UnmarshalAliasBuffer | protoiface.UnmarshalValidated,
|
||||
|
||||
depth: protowire.DefaultRecursionLimit,
|
||||
}
|
||||
|
||||
type unmarshalOutput struct {
|
||||
@ -94,9 +109,30 @@ func (mi *MessageInfo) unmarshalPointer(b []byte, p pointer, groupTag protowire.
|
||||
if flags.ProtoLegacy && mi.isMessageSet {
|
||||
return unmarshalMessageSet(mi, b, p, opts)
|
||||
}
|
||||
|
||||
lazyDecoding := LazyEnabled() // default
|
||||
if opts.NoLazyDecoding() {
|
||||
lazyDecoding = false // explicitly disabled
|
||||
}
|
||||
if mi.lazyOffset.IsValid() && lazyDecoding {
|
||||
return mi.unmarshalPointerLazy(b, p, groupTag, opts)
|
||||
}
|
||||
return mi.unmarshalPointerEager(b, p, groupTag, opts)
|
||||
}
|
||||
|
||||
// unmarshalPointerEager is the message unmarshalling function for all messages that are not lazy.
|
||||
// The corresponding function for Lazy is in google_lazy.go.
|
||||
func (mi *MessageInfo) unmarshalPointerEager(b []byte, p pointer, groupTag protowire.Number, opts unmarshalOptions) (out unmarshalOutput, err error) {
|
||||
|
||||
initialized := true
|
||||
var requiredMask uint64
|
||||
var exts *map[int32]ExtensionField
|
||||
|
||||
var presence presence
|
||||
if mi.presenceOffset.IsValid() {
|
||||
presence = p.Apply(mi.presenceOffset).PresenceInfo()
|
||||
}
|
||||
|
||||
start := len(b)
|
||||
for len(b) > 0 {
|
||||
// Parse the tag (field number and wire type).
|
||||
@ -154,6 +190,11 @@ func (mi *MessageInfo) unmarshalPointer(b []byte, p pointer, groupTag protowire.
|
||||
if f.funcs.isInit != nil && !o.initialized {
|
||||
initialized = false
|
||||
}
|
||||
|
||||
if f.presenceIndex != noPresence {
|
||||
presence.SetPresentUnatomic(f.presenceIndex, mi.presenceSize)
|
||||
}
|
||||
|
||||
default:
|
||||
// Possible extension.
|
||||
if exts == nil && mi.extensionOffset.IsValid() {
|
||||
@ -222,7 +263,7 @@ func (mi *MessageInfo) unmarshalExtension(b []byte, num protowire.Number, wtyp p
|
||||
return out, errUnknown
|
||||
}
|
||||
if flags.LazyUnmarshalExtensions {
|
||||
if opts.IsDefault() && x.canLazy(xt) {
|
||||
if opts.CanBeLazy() && x.canLazy(xt) {
|
||||
out, valid := skipExtension(b, xi, num, wtyp, opts)
|
||||
switch valid {
|
||||
case ValidationValid:
|
||||
@ -270,6 +311,13 @@ func skipExtension(b []byte, xi *extensionFieldInfo, num protowire.Number, wtyp
|
||||
if n < 0 {
|
||||
return out, ValidationUnknown
|
||||
}
|
||||
|
||||
if opts.Validated() {
|
||||
out.initialized = true
|
||||
out.n = n
|
||||
return out, ValidationValid
|
||||
}
|
||||
|
||||
out, st := xi.validation.mi.validate(v, 0, opts)
|
||||
out.n = n
|
||||
return out, st
|
||||
|
Reference in New Issue
Block a user