]> Cypherpunks repositories - gostls13.git/commit
math/big: fix nil bug in GobEncode
authorRob Pike <r@golang.org>
Mon, 19 Aug 2013 01:22:09 +0000 (11:22 +1000)
committerRob Pike <r@golang.org>
Mon, 19 Aug 2013 01:22:09 +0000 (11:22 +1000)
commitbc6bb3efb4f2f75375ab8820ee536f696269c6b4
tree03aefd11317ae6b573412e6643fa7f2130066ad8
parente8140bd03c154f8f9e894f5cb4be8b854c944412
math/big: fix nil bug in GobEncode

Update #5305.
This handles the case where the nil pointers are inside a slice.
A top-level nil pointer is harder, maybe fundamentally broken by gob's model.
Thinking required.
However, a slice is the important case since people don't expect to be sending
top-level nils much, but they can arise easily in slices.

R=golang-dev, josharian, adg
CC=golang-dev
https://golang.org/cl/13042044
src/pkg/math/big/int.go
src/pkg/math/big/int_test.go
src/pkg/math/big/rat.go
src/pkg/math/big/rat_test.go