diff options
Diffstat (limited to 'src/pkg/regexp/regexp.go')
-rw-r--r-- | src/pkg/regexp/regexp.go | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/pkg/regexp/regexp.go b/src/pkg/regexp/regexp.go index 5fb606a27..1ab9246f6 100644 --- a/src/pkg/regexp/regexp.go +++ b/src/pkg/regexp/regexp.go @@ -23,6 +23,7 @@ package regexp import ( + "bytes"; "container/vector"; "io"; "os"; @@ -770,7 +771,7 @@ func Match(pattern string, s string) (matched bool, error os.Error) { func (re *Regexp) ReplaceAll(src, repl string) string { lastMatchEnd := 0; // end position of the most recent match searchPos := 0; // position where we next look for a match - buf := new(io.ByteBuffer); + buf := new(bytes.Buffer); for searchPos <= len(src) { a := re.doExecute(src, searchPos); if len(a) == 0 { |