summaryrefslogtreecommitdiff
path: root/src/pkg/gob/encoder.go
diff options
context:
space:
mode:
Diffstat (limited to 'src/pkg/gob/encoder.go')
-rw-r--r--src/pkg/gob/encoder.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/pkg/gob/encoder.go b/src/pkg/gob/encoder.go
index dcd84281d..65ee5bf67 100644
--- a/src/pkg/gob/encoder.go
+++ b/src/pkg/gob/encoder.go
@@ -97,7 +97,7 @@ func (enc *Encoder) sendActualType(w io.Writer, state *encoderState, ut *userTyp
// Id:
state.encodeInt(-int64(info.id))
// Type:
- enc.encode(state.b, reflect.NewValue(info.wire), wireTypeUserInfo)
+ enc.encode(state.b, reflect.ValueOf(info.wire), wireTypeUserInfo)
enc.writeMessage(w, state.b)
if enc.err != nil {
return
@@ -165,7 +165,7 @@ func (enc *Encoder) sendType(w io.Writer, state *encoderState, origt reflect.Typ
// Encode transmits the data item represented by the empty interface value,
// guaranteeing that all necessary type information has been transmitted first.
func (enc *Encoder) Encode(e interface{}) os.Error {
- return enc.EncodeValue(reflect.NewValue(e))
+ return enc.EncodeValue(reflect.ValueOf(e))
}
// sendTypeDescriptor makes sure the remote side knows about this type.