From 8ad59edd02a8ea6001f15cd6d92944ae83c88f6d Mon Sep 17 00:00:00 2001 From: Ben Johnson Date: Wed, 12 Feb 2014 14:57:27 -0700 Subject: API Documentation. --- freelist.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'freelist.go') diff --git a/freelist.go b/freelist.go index cd0bffa..3f5cf1c 100644 --- a/freelist.go +++ b/freelist.go @@ -29,7 +29,7 @@ func (f *freelist) all() []pgid { // If a contiguous block cannot be found then 0 is returned. func (f *freelist) allocate(n int) pgid { var count int - var previd pgid = 0 + var previd pgid for i, id := range f.ids { // Reset count if this is not contiguous. if previd == 0 || previd-id != 1 { @@ -82,7 +82,7 @@ func (f *freelist) read(p *page) { // become free. func (f *freelist) write(p *page) { ids := f.all() - p.flags |= p_freelist + p.flags |= freelistPageFlag p.count = uint16(len(ids)) copy(((*[maxAllocSize]pgid)(unsafe.Pointer(&p.ptr)))[:], ids) } -- cgit v1.2.3