Commit bb8e36b4 authored by David Symonds's avatar David Symonds

gob: avoid a couple of init-time allocations.

R=r
CC=golang-dev
https://golang.org/cl/4806049
parent 19e80b08
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment