step 2 of the great buffer shift.

make strings.Buffer handle strings and bytes with comparable efficiency.
if ok, next step will be to move this code to bytes.Buffer and terminate
strings.Buffer's short happy life.

R=rsc
DELTA=292  (212 added, 0 deleted, 80 changed)
OCL=34837
CL=34849
This commit is contained in:
Rob Pike 2009-09-21 12:20:15 -07:00
parent de0d762a0f
commit fed4770685
5 changed files with 283 additions and 71 deletions

View file

@ -228,7 +228,7 @@ func TestWrongTypeDecoder(t *testing.T) {
}
func corruptDataCheck(s string, err os.Error, t *testing.T) {
b := strings.NewBuffer(s);
b := strings.NewBufferString(s);
dec := NewDecoder(b);
dec.Decode(new(ET2));
if dec.state.err != err {