summaryrefslogtreecommitdiffstats
path: root/vendor/google.golang.org/protobuf/proto/encode.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2020-09-04 23:29:13 +0200
committerGitHub <noreply@github.com>2020-09-04 23:29:13 +0200
commit2f59abdda7a1072036ea1fdb4c859cccbb56efa6 (patch)
treee35393f23d12783ae92f0469085efc7dec953f82 /vendor/google.golang.org/protobuf/proto/encode.go
parent17747a5c8893fd47ba8eb61dd10477170640caf6 (diff)
downloadmatterbridge-msglm-2f59abdda7a1072036ea1fdb4c859cccbb56efa6.tar.gz
matterbridge-msglm-2f59abdda7a1072036ea1fdb4c859cccbb56efa6.tar.bz2
matterbridge-msglm-2f59abdda7a1072036ea1fdb4c859cccbb56efa6.zip
Update vendor (#1228)
Diffstat (limited to 'vendor/google.golang.org/protobuf/proto/encode.go')
-rw-r--r--vendor/google.golang.org/protobuf/proto/encode.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/vendor/google.golang.org/protobuf/proto/encode.go b/vendor/google.golang.org/protobuf/proto/encode.go
index 456bfda4..7b47a118 100644
--- a/vendor/google.golang.org/protobuf/proto/encode.go
+++ b/vendor/google.golang.org/protobuf/proto/encode.go
@@ -134,6 +134,9 @@ func (o MarshalOptions) MarshalState(in protoiface.MarshalInput) (protoiface.Mar
return o.marshal(in.Buf, in.Message)
}
+// marshal is a centralized function that all marshal operations go through.
+// For profiling purposes, avoid changing the name of this function or
+// introducing other code paths for marshal that do not go through this.
func (o MarshalOptions) marshal(b []byte, m protoreflect.Message) (out protoiface.MarshalOutput, err error) {
allowPartial := o.AllowPartial
o.AllowPartial = true
@@ -206,7 +209,7 @@ func growcap(oldcap, wantcap int) (newcap int) {
func (o MarshalOptions) marshalMessageSlow(b []byte, m protoreflect.Message) ([]byte, error) {
if messageset.IsMessageSet(m.Descriptor()) {
- return marshalMessageSet(b, m, o)
+ return o.marshalMessageSet(b, m)
}
// There are many choices for what order we visit fields in. The default one here
// is chosen for reasonable efficiency and simplicity given the protoreflect API.