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
f0888bd2
Commit
f0888bd2
authored
Jul 31, 2018
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
590010d8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
go/zodb/btree/btree.go
go/zodb/btree/btree.go
+8
-1
No files found.
go/zodb/btree/btree.go
View file @
f0888bd2
...
...
@@ -81,7 +81,7 @@ type BTree struct {
//
// It loads intermediate BTree nodes from database on demand as needed.
func
(
t
*
BTree
)
Get
(
ctx
context
.
Context
,
key
KEY
)
(
_
interface
{},
_
bool
,
err
error
)
{
defer
xerr
.
Contextf
(
&
err
,
"btree(%s): get %
s
"
,
t
.
POid
(),
key
)
// XXX + url?
defer
xerr
.
Contextf
(
&
err
,
"btree(%s): get %
v
"
,
t
.
POid
(),
key
)
// XXX + url?
err
=
t
.
PActivate
(
ctx
)
if
err
!=
nil
{
return
nil
,
false
,
err
...
...
@@ -283,6 +283,13 @@ func (bt *btreeState) PySetState(pystate interface{}) (err error) {
// btree with 1 child bucket without oid
if
len
(
t
)
==
1
{
t
,
ok
:=
t
[
0
]
.
(
pickle
.
Tuple
)
if
!
ok
{
return
fmt
.
Errorf
(
"bucket1: expect [1](); got %T"
,
t
[
0
])
}
if
len
(
t
)
!=
1
{
return
fmt
.
Errorf
(
"bucket1: expect [1](); got [%d]()"
,
len
(
t
))
}
bucket
:=
zodb
.
NewPersistent
(
reflect
.
TypeOf
(
Bucket
{}),
bt
.
PJar
())
.
(
*
Bucket
)
err
:=
(
*
bucketState
)(
bucket
)
.
PySetState
(
t
[
0
])
if
err
!=
nil
{
...
...
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