Commit 1f651171 authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 72a0bb1e
...@@ -28,9 +28,9 @@ import ( ...@@ -28,9 +28,9 @@ import (
"reflect" "reflect"
"sort" "sort"
pickle "github.com/kisielk/og-rek"
"lab.nexedi.com/kirr/go123/xerr" "lab.nexedi.com/kirr/go123/xerr"
"lab.nexedi.com/kirr/neo/go/zodb" "lab.nexedi.com/kirr/neo/go/zodb"
pickle "github.com/kisielk/og-rek"
) )
// KEY is the type for BTree keys. // KEY is the type for BTree keys.
...@@ -38,7 +38,6 @@ import ( ...@@ -38,7 +38,6 @@ import (
// XXX -> template? // XXX -> template?
type KEY int64 type KEY int64
// Bucket is a leaf node of a B⁺ tree. // Bucket is a leaf node of a B⁺ tree.
// //
// It mimics ?OBucket from btree/py, with ? being any integer. // It mimics ?OBucket from btree/py, with ? being any integer.
...@@ -216,7 +215,7 @@ func (b *bucketState) PySetState(pystate interface{}) (err error) { ...@@ -216,7 +215,7 @@ func (b *bucketState) PySetState(pystate interface{}) (err error) {
if !ok { if !ok {
return fmt.Errorf("data: expect (...); got %T", t[0]) return fmt.Errorf("data: expect (...); got %T", t[0])
} }
if len(t) % 2 != 0 { if len(t)%2 != 0 {
return fmt.Errorf("data: expect [%%2](); got [%d]()", len(t)) return fmt.Errorf("data: expect [%%2](); got [%d]()", len(t))
} }
...@@ -324,7 +323,7 @@ func (bt *btreeState) PySetState(pystate interface{}) (err error) { ...@@ -324,7 +323,7 @@ func (bt *btreeState) PySetState(pystate interface{}) (err error) {
if !ok { if !ok {
return fmt.Errorf("data: expect (...); got %T", t[0]) return fmt.Errorf("data: expect (...); got %T", t[0])
} }
if len(t) % 2 == 0 { if len(t)%2 == 0 {
return fmt.Errorf("data: expect [!%%2](); got [%d]()", len(t)) return fmt.Errorf("data: expect [!%%2](); got [%d]()", len(t))
} }
...@@ -335,7 +334,7 @@ func (bt *btreeState) PySetState(pystate interface{}) (err error) { ...@@ -335,7 +334,7 @@ func (bt *btreeState) PySetState(pystate interface{}) (err error) {
if i > 0 { if i > 0 {
// key[0] is unused and not saved // key[0] is unused and not saved
key, ok = t[idx].(int64) // XXX Xint key, ok = t[idx].(int64) // XXX Xint
if ! ok { if !ok {
return fmt.Errorf("data: [%d]: key must be integer; got %T", i, t[idx]) return fmt.Errorf("data: [%d]: key must be integer; got %T", i, t[idx])
} }
idx++ idx++
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment