aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Kobetic <mkobetic@gmail.com>2014-05-12 20:47:03 +0000
committerMartin Kobetic <mkobetic@gmail.com>2014-05-12 20:47:03 +0000
commit51568b52df23cf3c000f6cfe998daeb2b739b6f4 (patch)
treed504c884c152e4f0337477131f70630971ec5946
parentadd inline stats to cmd (diff)
downloaddedo-51568b52df23cf3c000f6cfe998daeb2b739b6f4.tar.gz
dedo-51568b52df23cf3c000f6cfe998daeb2b739b6f4.tar.xz
undo page.go changes
-rw-r--r--page.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/page.go b/page.go
index 40e2421..56cf064 100644
--- a/page.go
+++ b/page.go
@@ -63,7 +63,7 @@ func (p *page) leafPageElement(index uint16) *leafPageElement {
// leafPageElements retrieves a list of leaf nodes.
func (p *page) leafPageElements() []leafPageElement {
- return ((*[maxNodesPerPage]leafPageElement)(unsafe.Pointer(&p.ptr)))[:p.count]
+ return ((*[maxNodesPerPage]leafPageElement)(unsafe.Pointer(&p.ptr)))[:]
}
// branchPageElement retrieves the branch node by index
@@ -73,7 +73,7 @@ func (p *page) branchPageElement(index uint16) *branchPageElement {
// branchPageElements retrieves a list of branch nodes.
func (p *page) branchPageElements() []branchPageElement {
- return ((*[maxNodesPerPage]branchPageElement)(unsafe.Pointer(&p.ptr)))[:p.count]
+ return ((*[maxNodesPerPage]branchPageElement)(unsafe.Pointer(&p.ptr)))[:]
}
// dump writes n bytes of the page to STDERR as hex output.