mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
gob: don't send type information about unexported fields.
A change a while back stop sending data for unexported fields but due to an oversight the type info was being sent also. It's inconsequential but wrong to do that. R=rsc, rh CC=golang-dev https://golang.org/cl/4252058
This commit is contained in:
parent
bfd3d81b92
commit
369c48cafb
4 changed files with 26 additions and 29 deletions
|
|
@ -13,9 +13,7 @@ import (
|
|||
"math"
|
||||
"os"
|
||||
"reflect"
|
||||
"unicode"
|
||||
"unsafe"
|
||||
"utf8"
|
||||
)
|
||||
|
||||
var (
|
||||
|
|
@ -1073,12 +1071,6 @@ func (dec *Decoder) compileIgnoreSingle(remoteId typeId) (engine *decEngine, err
|
|||
return
|
||||
}
|
||||
|
||||
// isExported reports whether this is an exported - upper case - name.
|
||||
func isExported(name string) bool {
|
||||
rune, _ := utf8.DecodeRuneInString(name)
|
||||
return unicode.IsUpper(rune)
|
||||
}
|
||||
|
||||
// compileDec compiles the decoder engine for a value. If the value is not a struct,
|
||||
// it calls out to compileSingle.
|
||||
func (dec *Decoder) compileDec(remoteId typeId, ut *userTypeInfo) (engine *decEngine, err os.Error) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue