protobuf-go/internal/filedesc
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
..
build_test.go
build.go
desc_init.go
desc_lazy.go internal/filedesc: avoid deep-copying the options 2019-07-08 17:26:50 +00:00
desc_list_gen.go
desc_list.go
desc_test.go
desc.go
name_pure.go
name_unsafe.go
placeholder.go