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
6273f533
Commit
6273f533
authored
Jul 19, 2018
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
f295ddd8
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
13 deletions
+19
-13
wcfs/xxx.go
wcfs/xxx.go
+0
-13
wcfs/zodbpy.go
wcfs/zodbpy.go
+19
-0
No files found.
wcfs/xxx.go
View file @
6273f533
package
main
// XXX -> pyObject.SetState
/*
pyclass, pystate, serial, err := pyobj.jar.loadpy(ctx, pyobj.oid)
if err == nil && pyclass != pyobj.pyclass {
// complain pyclass changed
// (both ref and object data uses pyclass so it indeed can be different)
err = &wrongClassError{want: pyobj.pyclass, have: pyclass} // XXX + err ctx
pystate = nil
}
*/
/*
conn.objmu.Lock() // XXX -> rlock
objentry := conn.objtab[oid]
...
...
wcfs/zodbpy.go
View file @
6273f533
...
...
@@ -59,6 +59,25 @@ type PyStateful interface {
//PyGetState() interface{} XXX
}
// ---- pyObject <-> object state exchange ----
func
(
pyobj
*
pyObject
)
SetState
(
state
*
mem
.
Buf
)
error
{
pyclass
,
pystate
,
err
=
zodb
.
PyData
(
state
.
Data
)
.
Decode
()
if
err
!=
nil
{
return
err
// XXX err ctx
}
if
pyclass
!=
pyobj
.
pyclass
{
// complain pyclass changed
// (both ref and object data use pyclass so it indeed can be different)
return
&
wrongClassError
{
want
:
pyobj
.
pyclass
,
have
:
pyclass
}
// XXX + err ctx
}
return
pyobj
.
instance
.
PySetState
(
pystate
)
// XXX err ctx = ok?
}
// TODO pyObject.GetState
// ---- pyclass -> new ghost ----
// path(pyclass) -> new(pyobj)
...
...
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