Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
neoppod
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Levin Zimmermann
neoppod
Commits
ddd6f454
Commit
ddd6f454
authored
Oct 04, 2021
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
a7b82699
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
21 deletions
+18
-21
go/zodb/btree/btree.go.in
go/zodb/btree/btree.go.in
+6
-7
go/zodb/btree/ziobtree.go
go/zodb/btree/ziobtree.go
+6
-7
go/zodb/btree/zlobtree.go
go/zodb/btree/zlobtree.go
+6
-7
No files found.
go/zodb/btree/btree.go.in
View file @
ddd6f454
...
...
@@ -102,6 +102,11 @@ type BucketEntry struct {
value interface{}
}
// KeyRange represents [lo,hi) key range.
type KeyRange struct {
Lo KEY
Hi_ KEY // NOTE _not_ hi) to avoid overflow at ∞; hi = hi_ + 1
}
const _KeyMin KEY = math.Min<Key>
const _KeyMax KEY = math.Max<Key>
...
...
@@ -694,12 +699,7 @@ func init() {
}
// XXX place
// KeyRange represents [lo,hi) key range.
type KeyRange struct {
Lo KEY
Hi_ KEY // NOTE _not_ hi) to avoid overflow at ∞; hi = hi_ + 1
}
// ---- misc ----
// Has returns whether key k belongs to the range.
func (r *KeyRange) Has(k KEY) bool {
...
...
@@ -728,7 +728,6 @@ func (r KeyRange) String() string {
}
// XXX place
func kmin(a, b KEY) KEY {
if a < b {
return a
...
...
go/zodb/btree/ziobtree.go
View file @
ddd6f454
...
...
@@ -104,6 +104,11 @@ type IOBucketEntry struct {
value
interface
{}
}
// IKeyRange represents [lo,hi) key range.
type
IKeyRange
struct
{
Lo
int32
Hi_
int32
// NOTE _not_ hi) to avoid overflow at ∞; hi = hi_ + 1
}
const
_IKeyMin
int32
=
math
.
MinInt32
const
_IKeyMax
int32
=
math
.
MaxInt32
...
...
@@ -696,12 +701,7 @@ func init() {
}
// XXX place
// IKeyRange represents [lo,hi) key range.
type
IKeyRange
struct
{
Lo
int32
Hi_
int32
// NOTE _not_ hi) to avoid overflow at ∞; hi = hi_ + 1
}
// ---- misc ----
// Has returns whether key k belongs to the range.
func
(
r
*
IKeyRange
)
Has
(
k
int32
)
bool
{
...
...
@@ -730,7 +730,6 @@ func (r IKeyRange) String() string {
}
// XXX place
func
ikmin
(
a
,
b
int32
)
int32
{
if
a
<
b
{
return
a
...
...
go/zodb/btree/zlobtree.go
View file @
ddd6f454
...
...
@@ -104,6 +104,11 @@ type LOBucketEntry struct {
value
interface
{}
}
// LKeyRange represents [lo,hi) key range.
type
LKeyRange
struct
{
Lo
int64
Hi_
int64
// NOTE _not_ hi) to avoid overflow at ∞; hi = hi_ + 1
}
const
_LKeyMin
int64
=
math
.
MinInt64
const
_LKeyMax
int64
=
math
.
MaxInt64
...
...
@@ -696,12 +701,7 @@ func init() {
}
// XXX place
// LKeyRange represents [lo,hi) key range.
type
LKeyRange
struct
{
Lo
int64
Hi_
int64
// NOTE _not_ hi) to avoid overflow at ∞; hi = hi_ + 1
}
// ---- misc ----
// Has returns whether key k belongs to the range.
func
(
r
*
LKeyRange
)
Has
(
k
int64
)
bool
{
...
...
@@ -730,7 +730,6 @@ func (r LKeyRange) String() string {
}
// XXX place
func
lkmin
(
a
,
b
int64
)
int64
{
if
a
<
b
{
return
a
...
...
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