From: Austin Clements Date: Mon, 27 Jul 2009 22:21:32 +0000 (-0700) Subject: Fix bug where nothing could ever be added to a code buffer. X-Git-Tag: weekly.2009-11-06~1062 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=33c10450569df9d06a1b5ee8d9af516299d6596f;p=gostls13.git Fix bug where nothing could ever be added to a code buffer. R=rsc APPROVED=rsc DELTA=2 (0 added, 0 deleted, 2 changed) OCL=32245 CL=32247 --- diff --git a/usr/austin/eval/func.go b/usr/austin/eval/func.go index cc198e4868..29bc05b225 100644 --- a/usr/austin/eval/func.go +++ b/usr/austin/eval/func.go @@ -49,7 +49,7 @@ func newCodeBuf() *codeBuf { return &codeBuf{make(code, 0, 16)}; } -func (b codeBuf) push(instr func(*vm)) { +func (b *codeBuf) push(instr func(*vm)) { n := len(b.instrs); if n >= cap(b.instrs) { a := make(code, n, n*2); @@ -62,7 +62,7 @@ func (b codeBuf) push(instr func(*vm)) { b.instrs[n] = instr; } -func (b codeBuf) get() code { +func (b *codeBuf) get() code { // Freeze this buffer into an array of exactly the right size a := make(code, len(b.instrs)); for i := range b.instrs {