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
cce696b2
Commit
cce696b2
authored
Feb 05, 2019
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
a552d9cd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
go/zodb/storage/zeo/zeo.go
go/zodb/storage/zeo/zeo.go
+6
-3
No files found.
go/zodb/storage/zeo/zeo.go
View file @
cce696b2
...
@@ -35,6 +35,7 @@ import (
...
@@ -35,6 +35,7 @@ import (
"lab.nexedi.com/kirr/go123/xerr"
"lab.nexedi.com/kirr/go123/xerr"
"lab.nexedi.com/kirr/go123/xnet"
"lab.nexedi.com/kirr/go123/xnet"
"lab.nexedi.com/kirr/neo/go/zodb"
"lab.nexedi.com/kirr/neo/go/zodb"
"lab.nexedi.com/kirr/neo/go/zodb/internal/pickletools"
)
)
type
zeo
struct
{
type
zeo
struct
{
...
@@ -404,15 +405,17 @@ func init() {
...
@@ -404,15 +405,17 @@ func init() {
// xuint64Unpack tries to decode packed 8-byte string as bigendian uint64
// xuint64Unpack tries to decode packed 8-byte string as bigendian uint64
func
xuint64Unpack
(
xv
interface
{})
(
uint64
,
bool
)
{
func
xuint64Unpack
(
xv
interface
{})
(
uint64
,
bool
)
{
s
,
ok
:=
xv
.
(
string
)
v
,
err
:=
pickletools
.
Xstrbytes8
(
xv
)
if
!
ok
||
len
(
s
)
!=
8
{
if
err
!=
nil
{
return
0
,
false
return
0
,
false
}
}
return
binary
.
BigEndian
.
Uint64
(
mem
.
Bytes
(
s
))
,
true
return
v
,
true
}
}
// xuint64Pack packs v into big-endian 8-byte string
// xuint64Pack packs v into big-endian 8-byte string
//
// XXX do we need to emit bytes instead of str?
func
xuint64Pack
(
v
uint64
)
string
{
func
xuint64Pack
(
v
uint64
)
string
{
var
b
[
8
]
byte
var
b
[
8
]
byte
binary
.
BigEndian
.
PutUint64
(
b
[
:
],
v
)
binary
.
BigEndian
.
PutUint64
(
b
[
:
],
v
)
...
...
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