Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neo
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
2
Merge Requests
2
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Jobs
Commits
Open sidebar
Kirill Smelkov
neo
Commits
762f2161
Commit
762f2161
authored
Oct 04, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
go/zodb/btree: Cosmetics
parent
e7bea476
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
9 additions
and
10 deletions
+9
-10
go/zodb/btree/btree.go.in
go/zodb/btree/btree.go.in
+3
-3
go/zodb/btree/testdata/gen-testdata
go/zodb/btree/testdata/gen-testdata
+0
-1
go/zodb/btree/ziobtree.go
go/zodb/btree/ziobtree.go
+3
-3
go/zodb/btree/zlobtree.go
go/zodb/btree/zlobtree.go
+3
-3
No files found.
go/zodb/btree/btree.go.in
View file @
762f2161
...
...
@@ -65,7 +65,7 @@ type BTree struct {
//
Entry
is
one
BTree
node
entry
.
//
//
It
contains
key
and
child
,
wh
o
is
either
BTree
or
Bucket
.
//
It
contains
key
and
child
,
wh
ich
is
either
BTree
or
Bucket
.
//
//
Key
limits
child
's keys - see BTree.Entryv for details.
type Entry struct {
...
...
@@ -123,7 +123,7 @@ func (e *Entry) Child() Node { return e.child }
// Children of all entries are guaranteed to be of the same kind - either all BTree, or all Bucket.
//
// The caller must not modify returned array.
func (t *BTree) Entryv() []Entry {
func (t *BTree) Entryv()
/*readonly*/
[]Entry {
return t.data
}
...
...
@@ -134,7 +134,7 @@ func (e *BucketEntry) Key() KEY { return e.key }
func (e *BucketEntry) Value() interface{} { return e.value }
// Entryv returns entries of a Bucket node.
func (b *Bucket) Entryv() []BucketEntry {
func (b *Bucket) Entryv()
/*readonly*/
[]BucketEntry {
ev := make([]BucketEntry, len(b.keys))
for i, k := range b.keys {
ev[i] = BucketEntry{k, b.values[i]}
...
...
go/zodb/btree/testdata/gen-testdata
View file @
762f2161
...
...
@@ -59,7 +59,6 @@ def main2():
print
>>
f
,
v
emit
(
"// Code generated by %s; DO NOT EDIT."
%
__file__
)
emit
(
"package btree
\
n
"
)
#emit("import \"lab.nexedi.com/kirr/neo/go/zodb\"\n")
def
emititems
(
b
):
s
=
"testEntry{oid: %s, kind: %s, itemv: []kv{"
\
...
...
go/zodb/btree/ziobtree.go
View file @
762f2161
...
...
@@ -67,7 +67,7 @@ type IOBTree struct {
// IOEntry is one IOBTree node entry.
//
// It contains key and child, wh
o
is either IOBTree or IOBucket.
// It contains key and child, wh
ich
is either IOBTree or IOBucket.
//
// Key limits child's keys - see IOBTree.Entryv for details.
type
IOEntry
struct
{
...
...
@@ -125,7 +125,7 @@ func (e *IOEntry) Child() IONode { return e.child }
// Children of all entries are guaranteed to be of the same kind - either all IOBTree, or all IOBucket.
//
// The caller must not modify returned array.
func
(
t
*
IOBTree
)
Entryv
()
[]
IOEntry
{
func
(
t
*
IOBTree
)
Entryv
()
/*readonly*/
[]
IOEntry
{
return
t
.
data
}
...
...
@@ -136,7 +136,7 @@ func (e *IOBucketEntry) Key() int32 { return e.key }
func
(
e
*
IOBucketEntry
)
Value
()
interface
{}
{
return
e
.
value
}
// Entryv returns entries of a IOBucket node.
func
(
b
*
IOBucket
)
Entryv
()
[]
IOBucketEntry
{
func
(
b
*
IOBucket
)
Entryv
()
/*readonly*/
[]
IOBucketEntry
{
ev
:=
make
([]
IOBucketEntry
,
len
(
b
.
keys
))
for
i
,
k
:=
range
b
.
keys
{
ev
[
i
]
=
IOBucketEntry
{
k
,
b
.
values
[
i
]}
...
...
go/zodb/btree/zlobtree.go
View file @
762f2161
...
...
@@ -67,7 +67,7 @@ type LOBTree struct {
// LOEntry is one LOBTree node entry.
//
// It contains key and child, wh
o
is either LOBTree or LOBucket.
// It contains key and child, wh
ich
is either LOBTree or LOBucket.
//
// Key limits child's keys - see LOBTree.Entryv for details.
type
LOEntry
struct
{
...
...
@@ -125,7 +125,7 @@ func (e *LOEntry) Child() LONode { return e.child }
// Children of all entries are guaranteed to be of the same kind - either all LOBTree, or all LOBucket.
//
// The caller must not modify returned array.
func
(
t
*
LOBTree
)
Entryv
()
[]
LOEntry
{
func
(
t
*
LOBTree
)
Entryv
()
/*readonly*/
[]
LOEntry
{
return
t
.
data
}
...
...
@@ -136,7 +136,7 @@ func (e *LOBucketEntry) Key() int64 { return e.key }
func
(
e
*
LOBucketEntry
)
Value
()
interface
{}
{
return
e
.
value
}
// Entryv returns entries of a LOBucket node.
func
(
b
*
LOBucket
)
Entryv
()
[]
LOBucketEntry
{
func
(
b
*
LOBucket
)
Entryv
()
/*readonly*/
[]
LOBucketEntry
{
ev
:=
make
([]
LOBucketEntry
,
len
(
b
.
keys
))
for
i
,
k
:=
range
b
.
keys
{
ev
[
i
]
=
LOBucketEntry
{
k
,
b
.
values
[
i
]}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment