vendor: boltdb/bolt v1.3.0 for Go 1.7

In case somebody wants to build this branch with Go 1.7
This commit is contained in:
Gyu-Ho Lee
2016-08-18 14:41:34 -07:00
parent ec576ee5ac
commit 6a1e3e73dd
5 changed files with 32 additions and 13 deletions

View File

@ -62,6 +62,9 @@ func (p *page) leafPageElement(index uint16) *leafPageElement {
// leafPageElements retrieves a list of leaf nodes.
func (p *page) leafPageElements() []leafPageElement {
if p.count == 0 {
return nil
}
return ((*[0x7FFFFFF]leafPageElement)(unsafe.Pointer(&p.ptr)))[:]
}
@ -72,6 +75,9 @@ func (p *page) branchPageElement(index uint16) *branchPageElement {
// branchPageElements retrieves a list of branch nodes.
func (p *page) branchPageElements() []branchPageElement {
if p.count == 0 {
return nil
}
return ((*[0x7FFFFFF]branchPageElement)(unsafe.Pointer(&p.ptr)))[:]
}