]> Cypherpunks repositories - gostls13.git/commit
exp/norm: fixed two unrelated bugs in normalization library.
authorMarcel van Lohuizen <mpvl@golang.org>
Fri, 23 Dec 2011 17:21:26 +0000 (18:21 +0100)
committerMarcel van Lohuizen <mpvl@golang.org>
Fri, 23 Dec 2011 17:21:26 +0000 (18:21 +0100)
commitcadbd3ea4986a43eebb1be3cacdce346513d537f
tree35d42d5c56d07a305731a648c91288d295dfda0b
parent335c5db76a3cefb98fdd30068440497ed119a8eb
exp/norm: fixed two unrelated bugs in normalization library.
1) incorrect length given for out buffer in String.
2) patchTail bug that could cause characters to be lost
   when crossing into the out-buffer boundary.

Added tests to expose these bugs.  Also slightly improved
performance of Bytes() and String() by sharing the reorderBuffer
across operations.

Fixes #2567.

R=r
CC=golang-dev
https://golang.org/cl/5502069
src/pkg/exp/norm/input.go
src/pkg/exp/norm/normalize.go
src/pkg/exp/norm/normalize_test.go
src/pkg/exp/norm/readwriter.go