]> Cypherpunks repositories - gostls13.git/commit
gob: several fixes.
authorRob Pike <r@golang.org>
Sun, 31 Oct 2010 20:41:30 +0000 (13:41 -0700)
committerRob Pike <r@golang.org>
Sun, 31 Oct 2010 20:41:30 +0000 (13:41 -0700)
commit7f7cb166c8e0645936a391c64ada1a965196e00c
tree3c798bbc7bf94c278dad971c669ec9ef91022cdf
parentf62772b1e53315685b6e3c3fc7bd07b16c67113b
gob: several fixes.

1) Be sure to use the eval-time encoder/decoder rather than
the compile-time decoder.  In a few cases the receiver for
the compiling encoder was being pickled incorrectly into a
closure.
(This is the fix for issue 1238).

2) Get the innermost name right when given a pointer to an
unnamed type.

3) Use a count to delineate interface values, making it
possible to ignore values without having a concrete type
to encode into.  This is a protocol change but only for the
new feature, so it shouldn't affect anyone.  The old test
worked because, amazingly, it depended on bug #1.

Fixes #1238.

R=rsc, albert.strasheim
CC=golang-dev
https://golang.org/cl/2806041
src/pkg/gob/codec_test.go
src/pkg/gob/debug.go
src/pkg/gob/decode.go
src/pkg/gob/decoder.go
src/pkg/gob/encode.go
src/pkg/gob/encoder.go
src/pkg/gob/type.go