diff options
Diffstat (limited to 'src/pkg/gob/type.go')
-rw-r--r-- | src/pkg/gob/type.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/pkg/gob/type.go b/src/pkg/gob/type.go index cd05a390b..7eaae05a1 100644 --- a/src/pkg/gob/type.go +++ b/src/pkg/gob/type.go @@ -310,10 +310,14 @@ func bootstrapType(name string, e interface{}) TypeId { // are built in encode.go's init() function. type wireType struct { - name string; s *structType; } +func (w *wireType) name() string { + // generalize once we can have non-struct types on the wire. + return w.s.name +} + type decEngine struct // defined in decode.go type encEngine struct // defined in encode.go type typeInfo struct { @@ -336,7 +340,7 @@ func getTypeInfo(rt reflect.Type) *typeInfo { path, name := rt.Name(); info.typeId = getType(name, rt).id(); // assume it's a struct type - info.wire = &wireType{name, info.typeId.gobType().(*structType)}; + info.wire = &wireType{info.typeId.gobType().(*structType)}; typeInfoMap[rt] = info; } return info; |