diff options
author | Rob Pike <r@golang.org> | 2009-07-28 17:20:19 -0700 |
---|---|---|
committer | Rob Pike <r@golang.org> | 2009-07-28 17:20:19 -0700 |
commit | 2371820a800563d0a7a5a96e34f9e158bc81eb24 (patch) | |
tree | e28e2153d863e5f8d66e6f67ff3d6ea183686f79 /src/pkg/gob/encoder_test.go | |
parent | cc74f077abe6bb64b8200834dc009a426555d17c (diff) | |
download | golang-2371820a800563d0a7a5a96e34f9e158bc81eb24.tar.gz |
change the encoding of uints to simplify overflow checking and to make them
easier and faster to read. they are now either a one-byte value or a n-byte value
preceded by a byte holding -n.
R=rsc
DELTA=150 (45 added, 7 deleted, 98 changed)
OCL=32381
CL=32387
Diffstat (limited to 'src/pkg/gob/encoder_test.go')
-rw-r--r-- | src/pkg/gob/encoder_test.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/pkg/gob/encoder_test.go b/src/pkg/gob/encoder_test.go index a7e66a57e..3e82d8f76 100644 --- a/src/pkg/gob/encoder_test.go +++ b/src/pkg/gob/encoder_test.go @@ -50,8 +50,7 @@ func TestBasicEncoder(t *testing.T) { } // Decode the result by hand to verify; - state := new(decodeState); - state.b = b; + state := newDecodeState(b); // The output should be: // 0) The length, 38. length := decodeUint(state); |