mirror of
https://github.com/golang/go
synced 2024-11-20 08:24:42 -07:00
gob: trivial cleanup
R=golang-dev, r CC=golang-dev https://golang.org/cl/4279074
This commit is contained in:
parent
2795b13156
commit
a4df525a79
@ -407,7 +407,7 @@ func (s *structType) string() string { return s.safeString(make(map[typeId]bool)
|
|||||||
func newStructType(name string) *structType {
|
func newStructType(name string) *structType {
|
||||||
s := &structType{CommonType{Name: name}, nil}
|
s := &structType{CommonType{Name: name}, nil}
|
||||||
// For historical reasons we set the id here rather than init.
|
// For historical reasons we set the id here rather than init.
|
||||||
// Se the comment in newTypeObject for details.
|
// See the comment in newTypeObject for details.
|
||||||
setTypeId(s)
|
setTypeId(s)
|
||||||
return s
|
return s
|
||||||
}
|
}
|
||||||
@ -561,7 +561,7 @@ func getType(name string, ut *userTypeInfo, rt reflect.Type) (gobType, os.Error)
|
|||||||
|
|
||||||
func checkId(want, got typeId) {
|
func checkId(want, got typeId) {
|
||||||
if want != got {
|
if want != got {
|
||||||
fmt.Fprintf(os.Stderr, "checkId: %d should be %d\n", int(want), int(got))
|
fmt.Fprintf(os.Stderr, "checkId: %d should be %d\n", int(got), int(want))
|
||||||
panic("bootstrap type wrong id: " + got.name() + " " + got.string() + " not " + want.string())
|
panic("bootstrap type wrong id: " + got.name() + " " + got.string() + " not " + want.string())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user