mirror of
https://github.com/golang/go
synced 2024-11-24 10:10:07 -07:00
gob: avoid a couple of init-time allocations.
R=r CC=golang-dev https://golang.org/cl/4806049
This commit is contained in:
parent
19e80b0818
commit
bb8e36b4a1
@ -81,8 +81,8 @@ func validUserType(rt reflect.Type) (ut *userTypeInfo, err os.Error) {
|
||||
}
|
||||
|
||||
var (
|
||||
gobEncoderInterfaceType = reflect.TypeOf(new(GobEncoder)).Elem()
|
||||
gobDecoderInterfaceType = reflect.TypeOf(new(GobDecoder)).Elem()
|
||||
gobEncoderInterfaceType = reflect.TypeOf((*GobEncoder)(nil)).Elem()
|
||||
gobDecoderInterfaceType = reflect.TypeOf((*GobDecoder)(nil)).Elem()
|
||||
)
|
||||
|
||||
// implementsInterface reports whether the type implements the
|
||||
|
Loading…
Reference in New Issue
Block a user