aboutsummaryrefslogtreecommitdiff
path: root/src/encoding/gob
diff options
context:
space:
mode:
authorRick Hudson <rlh@golang.org>2016-04-27 18:19:16 -0400
committerRick Hudson <rlh@golang.org>2016-04-27 18:46:52 -0400
commit23aeb34df172b17b7bfaa85fb59ca64bef9073bb (patch)
treea8ab866f1e50f0059856ce628f036d93ab620155 /src/encoding/gob
parent1354b32cd70f2702381764fd595dd2faa996840c (diff)
parentd3c79d324acd7300b6f705e66af8ca711af00d9f (diff)
downloadgo-23aeb34df172b17b7bfaa85fb59ca64bef9073bb.tar.xz
[dev.garbage] Merge remote-tracking branch 'origin/master' into HEAD
Change-Id: I282fd9ce9db435dfd35e882a9502ab1abc185297
Diffstat (limited to 'src/encoding/gob')
-rw-r--r--src/encoding/gob/doc.go6
-rw-r--r--src/encoding/gob/encode.go2
2 files changed, 7 insertions, 1 deletions
diff --git a/src/encoding/gob/doc.go b/src/encoding/gob/doc.go
index cf878f4502..6f86d84891 100644
--- a/src/encoding/gob/doc.go
+++ b/src/encoding/gob/doc.go
@@ -254,6 +254,12 @@ In summary, a gob stream looks like
where * signifies zero or more repetitions and the type id of a value must
be predefined or be defined before the value in the stream.
+Compatibility: Any future changes to the package will endeavor to maintain
+compatibility with streams encoded using previous versions. That is, any released
+version of this package should be able to decode data written with any previously
+released version, subject to issues such as security fixes. See the Go compatibility
+document for background: https://golang.org/doc/go1compat
+
See "Gobs of data" for a design discussion of the gob wire format:
https://blog.golang.org/gobs-of-data
*/
diff --git a/src/encoding/gob/encode.go b/src/encoding/gob/encode.go
index 2b3a556eac..50cd6adb46 100644
--- a/src/encoding/gob/encode.go
+++ b/src/encoding/gob/encode.go
@@ -127,7 +127,7 @@ func (state *encoderState) encodeInt(i int64) {
} else {
x = uint64(i << 1)
}
- state.encodeUint(uint64(x))
+ state.encodeUint(x)
}
// encOp is the signature of an encoding operator for a given type.