summaryrefslogtreecommitdiff
path: root/vendor/google.golang.org/protobuf/proto/decode.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-08-28 08:23:59 -0400
committerGitHub <noreply@github.com>2020-08-28 08:23:59 -0400
commit74bdf52c401dd1c9cd3c636d4fa8ea94e7c88ef3 (patch)
treeaf0904e9ec643dea2caa8d39a55764adc38c069f /vendor/google.golang.org/protobuf/proto/decode.go
parent061c93f70101026d79cca6e75ac0c565e1fa99ec (diff)
parent90a86cad3a6f007c6708406d8a78528fbb302a0a (diff)
downloadpodman-74bdf52c401dd1c9cd3c636d4fa8ea94e7c88ef3.tar.gz
podman-74bdf52c401dd1c9cd3c636d4fa8ea94e7c88ef3.tar.bz2
podman-74bdf52c401dd1c9cd3c636d4fa8ea94e7c88ef3.zip
Merge pull request #7472 from containers/dependabot/go_modules/k8s.io/apimachinery-0.19.0
Bump k8s.io/apimachinery from 0.18.8 to 0.19.0
Diffstat (limited to 'vendor/google.golang.org/protobuf/proto/decode.go')
-rw-r--r--vendor/google.golang.org/protobuf/proto/decode.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/vendor/google.golang.org/protobuf/proto/decode.go b/vendor/google.golang.org/protobuf/proto/decode.go
index 128214760..4974b16d5 100644
--- a/vendor/google.golang.org/protobuf/proto/decode.go
+++ b/vendor/google.golang.org/protobuf/proto/decode.go
@@ -63,12 +63,15 @@ func (o UnmarshalOptions) UnmarshalState(in protoiface.UnmarshalInput) (protoifa
return o.unmarshal(in.Buf, in.Message)
}
+// unmarshal is a centralized function that all unmarshal operations go through.
+// For profiling purposes, avoid changing the name of this function or
+// introducing other code paths for unmarshal that do not go through this.
func (o UnmarshalOptions) unmarshal(b []byte, m protoreflect.Message) (out protoiface.UnmarshalOutput, err error) {
if o.Resolver == nil {
o.Resolver = protoregistry.GlobalTypes
}
if !o.Merge {
- Reset(m.Interface()) // TODO
+ Reset(m.Interface())
}
allowPartial := o.AllowPartial
o.Merge = true
@@ -105,7 +108,7 @@ func (o UnmarshalOptions) unmarshalMessage(b []byte, m protoreflect.Message) err
func (o UnmarshalOptions) unmarshalMessageSlow(b []byte, m protoreflect.Message) error {
md := m.Descriptor()
if messageset.IsMessageSet(md) {
- return unmarshalMessageSet(b, m, o)
+ return o.unmarshalMessageSet(b, m)
}
fields := md.Fields()
for len(b) > 0 {