aboutsummaryrefslogtreecommitdiff
path: root/bnode.go
diff options
context:
space:
mode:
authorBen Johnson <benbjohnson@yahoo.com>2014-01-29 19:12:49 -0500
committerBen Johnson <benbjohnson@yahoo.com>2014-01-29 19:12:49 -0500
commitd38be1d25bcf0e2955d64e1a6e2ea6e5e260ddad (patch)
treeb5a8772fa9373751868778b272f06fc635292c96 /bnode.go
parentAdd branch.put(). (diff)
downloaddedo-d38be1d25bcf0e2955d64e1a6e2ea6e5e260ddad.tar.gz
dedo-d38be1d25bcf0e2955d64e1a6e2ea6e5e260ddad.tar.xz
Add branch.split()
Diffstat (limited to 'bnode.go')
-rw-r--r--bnode.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/bnode.go b/bnode.go
index 9fef154..3ad4f58 100644
--- a/bnode.go
+++ b/bnode.go
@@ -15,5 +15,6 @@ type bnode struct {
// key returns a byte slice of the node key.
func (n *bnode) key() []byte {
- return (*[MaxKeySize]byte)(unsafe.Pointer(&n))[n.pos : n.pos+n.ksize]
+ buf := (*[maxAllocSize]byte)(unsafe.Pointer(n))
+ return buf[n.pos : n.pos+n.ksize]
}