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
5e2e0753
Commit
5e2e0753
authored
Jul 27, 2018
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
922b606d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
6 deletions
+14
-6
go/zodb/btree/btree.go
go/zodb/btree/btree.go
+11
-4
go/zodb/zodbpy.go
go/zodb/zodbpy.go
+3
-2
No files found.
go/zodb/btree/btree.go
View file @
5e2e0753
...
...
@@ -316,10 +316,17 @@ func (b *Bucket) PySetState(pystate interface{}) error {
// ---- register classes to ZODB ----
func
bucketNew
(
base
*
zodb
.
PyPersistent
)
zodb
.
IPyPersistent
{
return
&
Bucket
{
PyPersistent
:
base
}
}
func
btreeNew
(
base
*
zodb
.
PyPersistent
)
zodb
.
IPyPersistent
{
return
&
BTree
{
PyPersistent
:
base
}
}
func
bucketNew
(
base
*
zodb
.
Persistent
)
zodb
.
IPersistent
{
// XXX simplify vvv
return
&
Bucket
{
PyPersistent
:
&
zodb
.
PyPersistent
{
Persistent
:
base
}}
}
func
btreeNew
(
base
*
zodb
.
Persistent
)
zodb
.
IPersistent
{
// XXX simplify vvv
return
&
BTree
{
PyPersistent
:
&
zodb
.
PyPersistent
{
Persistent
:
base
}}
}
func
init
()
{
zodb
.
Py
RegisterClass
(
"zodb.BTree.LOBucket"
,
bucketNew
)
zodb
.
Py
RegisterClass
(
"zodb.BTree.LOBtree"
,
btreeNew
)
zodb
.
RegisterClass
(
"zodb.BTree.LOBucket"
,
bucketNew
)
zodb
.
RegisterClass
(
"zodb.BTree.LOBtree"
,
btreeNew
)
}
go/zodb/zodbpy.go
View file @
5e2e0753
...
...
@@ -25,6 +25,7 @@ import (
)
// IPyPersistent is the interface that every in-RAM object representing Python ZODB object implements.
// XXX kill
type
IPyPersistent
interface
{
IPersistent
...
...
@@ -40,8 +41,8 @@ type IPyPersistent interface {
// PyPersistent is common base implementation for in-RAM representation of ZODB Python objects.
type
PyPersistent
struct
{
Persistent
pyclass
pickle
.
Class
*
Persistent
// XXX remove ptr
pyclass
pickle
.
Class
// XXX kill
}
//func (pyobj *PyPersistent) PyClass() pickle.Class { return pyobj.pyclass }
...
...
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