protobuf-go/reflect/protoreflect
Joe Tsai 8a4c3d18b1 internal/filedesc: avoid deep-copying the options
The protoreflect.Descriptor.Options method is currently documented as
returning a reference to the options, where the user must not mutate
the returned message. This changes internal/filedesc to avoid returning
a copy of the options by caching the first unmarshal.

See golang/protobuf#877

Change-Id: I15701d33fbda7535b21b2add72628b02992c373f
Reviewed-on: https://go-review.googlesource.com/c/protobuf/+/185197
Reviewed-by: Benny Siegert <bsiegert@gmail.com>
2019-07-08 17:26:50 +00:00
..
proto_test.go reflect/protoreflect: initial commit 2018-08-10 19:59:50 +00:00
proto.go reflect/protoreflect: print unknown number in String methods 2019-06-24 23:34:46 +00:00
type.go internal/filedesc: avoid deep-copying the options 2019-07-08 17:26:50 +00:00
value_pure.go all: change module to google.golang.org/protobuf 2019-05-14 17:28:29 +00:00
value_test.go all: rename Vector as List 2018-11-14 23:03:53 +00:00
value_union.go reflect/protoreflect: add alternative message reflection API 2019-06-17 17:33:24 +00:00
value_unsafe.go all: change module to google.golang.org/protobuf 2019-05-14 17:28:29 +00:00
value.go all: remove protoreflect.Message.Len 2019-06-25 21:59:46 +00:00