Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
W
wendelin.core
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
Kirill Smelkov
wendelin.core
Commits
f50447a9
Commit
f50447a9
authored
Aug 03, 2018
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
f37de13c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
7 deletions
+11
-7
wcfs/zblk.go
wcfs/zblk.go
+11
-7
No files found.
wcfs/zblk.go
View file @
f50447a9
...
...
@@ -23,6 +23,7 @@ package main
import
(
//"context"
"fmt"
"reflect"
"lab.nexedi.com/kirr/neo/go/zodb"
...
...
@@ -51,7 +52,7 @@ func (zb *zBlk0State) DropState() {
func
(
zb
*
zBlk0State
)
PySetState
(
pystate
interface
{})
error
{
blkdata
,
ok
:=
pystate
.
(
string
)
if
!
ok
{
// XXX
return
fmt
.
Errorf
(
"expect str; got %T"
,
pystate
)
}
zb
.
blkdata
=
blkdata
...
...
@@ -76,7 +77,7 @@ func (zd *zDataState) DropState() {
func
(
zd
*
zDataState
)
PySetState
(
pystate
interface
{})
error
{
data
,
ok
:=
pystate
.
(
string
)
if
!
ok
{
// XXX
return
fmt
.
Errorf
(
"expect str; got %T"
,
pystate
)
}
zd
.
data
=
data
...
...
@@ -99,7 +100,7 @@ func (zb *zBlk1State) DropState() {
func
(
zb
*
zBlk1State
)
PySetState
(
pystate
interface
{})
error
{
chunktab
,
ok
:=
pystate
.
(
*
btree
.
BTree
)
if
!
ok
{
// XXX
return
fmt
.
Errorf
(
"expect BTree; got %T"
,
pystate
)
}
zb
.
chunktab
=
chunktab
...
...
@@ -135,18 +136,21 @@ func (bf *zBigFileState) PySetState(pystate interface{}) (err error) {
// state: (.blksize, .blktab)
t
,
ok
:=
pystate
.
(
pickle
.
Tuple
)
if
!
ok
||
len
(
t
)
!=
2
{
// XXX
if
!
ok
{
return
fmt
.
Errorf
(
"expect [2](); got %T"
,
pystate
)
}
if
len
(
t
)
!=
2
{
return
fmt
.
Errorf
(
"expect [2](); got [%d]()"
,
len
(
t
))
}
// blksize, ok := pickletools.Xint64(t[0]) // XXX reenable (pickletools)
if
!
ok
{
// XXX
return
fmt
.
Errorf
(
"blksize: expect integer; got %T"
,
t
[
0
])
}
blktab
,
ok
:=
t
[
1
]
.
(
*
btree
.
BTree
)
if
!
ok
{
// XXX
return
fmt
.
Errorf
(
"blktab: expect BTree; got %T"
,
t
[
1
])
}
bf
.
blksize
=
0
// XXX blksize
...
...
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