This commit is contained in:
Ben Johnson 2014-01-28 17:03:52 -05:00
parent da6d48abe9
commit dcc5c661e2
3 changed files with 4 additions and 4 deletions

View File

@ -17,11 +17,11 @@ type lnode struct {
// key returns a byte slice of the node key.
func (n *lnode) key() []byte {
buf := (*[maxAllocSize]byte)(unsafe.Pointer(n))
return buf[n.pos:n.pos+n.ksize]
return buf[n.pos : n.pos+n.ksize]
}
// value returns a byte slice of the node value.
func (n *lnode) value() []byte {
buf := (*[maxAllocSize]byte)(unsafe.Pointer(n))
return buf[n.pos+n.ksize:n.pos+n.ksize+n.vsize]
return buf[n.pos+n.ksize : n.pos+n.ksize+n.vsize]
}

View File

@ -6,7 +6,7 @@ import (
"unsafe"
)
// tpage represents a temporary, in-memory leaf page.
// tpage represents a temporary in-memory leaf page.
// It is deserialized from an memory-mapped page and is not restricted by page size.
type tpage struct {
nodes tnodes