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
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 {
...
@@ -102,6 +102,11 @@ type BucketEntry struct {
value interface{}
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 _KeyMin KEY = math.Min<Key>
const _KeyMax KEY = math.Max<Key>
const _KeyMax KEY = math.Max<Key>
...
@@ -694,12 +699,7 @@ func init() {
...
@@ -694,12 +699,7 @@ func init() {
}
}
// XXX place
// ---- misc ----
// KeyRange represents [lo,hi) key range.
type KeyRange struct {
Lo KEY
Hi_ KEY // NOTE _not_ hi) to avoid overflow at ∞; hi = hi_ + 1
}
// Has returns whether key k belongs to the range.
// Has returns whether key k belongs to the range.
func (r *KeyRange) Has(k KEY) bool {
func (r *KeyRange) Has(k KEY) bool {
...
@@ -728,7 +728,6 @@ func (r KeyRange) String() string {
...
@@ -728,7 +728,6 @@ func (r KeyRange) String() string {
}
}
// XXX place
func kmin(a, b KEY) KEY {
func kmin(a, b KEY) KEY {
if a < b {
if a < b {
return a
return a
...
...
go/zodb/btree/ziobtree.go
View file @
ddd6f454
...
@@ -104,6 +104,11 @@ type IOBucketEntry struct {
...
@@ -104,6 +104,11 @@ type IOBucketEntry struct {
value
interface
{}
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
_IKeyMin
int32
=
math
.
MinInt32
const
_IKeyMax
int32
=
math
.
MaxInt32
const
_IKeyMax
int32
=
math
.
MaxInt32
...
@@ -696,12 +701,7 @@ func init() {
...
@@ -696,12 +701,7 @@ func init() {
}
}
// XXX place
// ---- misc ----
// IKeyRange represents [lo,hi) key range.
type
IKeyRange
struct
{
Lo
int32
Hi_
int32
// NOTE _not_ hi) to avoid overflow at ∞; hi = hi_ + 1
}
// Has returns whether key k belongs to the range.
// Has returns whether key k belongs to the range.
func
(
r
*
IKeyRange
)
Has
(
k
int32
)
bool
{
func
(
r
*
IKeyRange
)
Has
(
k
int32
)
bool
{
...
@@ -730,7 +730,6 @@ func (r IKeyRange) String() string {
...
@@ -730,7 +730,6 @@ func (r IKeyRange) String() string {
}
}
// XXX place
func
ikmin
(
a
,
b
int32
)
int32
{
func
ikmin
(
a
,
b
int32
)
int32
{
if
a
<
b
{
if
a
<
b
{
return
a
return
a
...
...
go/zodb/btree/zlobtree.go
View file @
ddd6f454
...
@@ -104,6 +104,11 @@ type LOBucketEntry struct {
...
@@ -104,6 +104,11 @@ type LOBucketEntry struct {
value
interface
{}
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
_LKeyMin
int64
=
math
.
MinInt64
const
_LKeyMax
int64
=
math
.
MaxInt64
const
_LKeyMax
int64
=
math
.
MaxInt64
...
@@ -696,12 +701,7 @@ func init() {
...
@@ -696,12 +701,7 @@ func init() {
}
}
// XXX place
// ---- misc ----
// LKeyRange represents [lo,hi) key range.
type
LKeyRange
struct
{
Lo
int64
Hi_
int64
// NOTE _not_ hi) to avoid overflow at ∞; hi = hi_ + 1
}
// Has returns whether key k belongs to the range.
// Has returns whether key k belongs to the range.
func
(
r
*
LKeyRange
)
Has
(
k
int64
)
bool
{
func
(
r
*
LKeyRange
)
Has
(
k
int64
)
bool
{
...
@@ -730,7 +730,6 @@ func (r LKeyRange) String() string {
...
@@ -730,7 +730,6 @@ func (r LKeyRange) String() string {
}
}
// XXX place
func
lkmin
(
a
,
b
int64
)
int64
{
func
lkmin
(
a
,
b
int64
)
int64
{
if
a
<
b
{
if
a
<
b
{
return
a
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