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
e38e26e2
Commit
e38e26e2
authored
Aug 10, 2018
by
Kirill Smelkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
.
parent
9a51360f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
0 deletions
+10
-0
go/zodb/connection.go
go/zodb/connection.go
+4
-0
go/zodb/persistent.go
go/zodb/persistent.go
+6
-0
No files found.
go/zodb/connection.go
View file @
e38e26e2
...
@@ -155,6 +155,10 @@ func (conn *Connection) get(class string, oid Oid) (IPersistent, error) {
...
@@ -155,6 +155,10 @@ func (conn *Connection) get(class string, oid Oid) (IPersistent, error) {
}
}
if
obj
==
nil
{
if
obj
==
nil
{
obj
=
newGhost
(
class
,
oid
,
conn
)
obj
=
newGhost
(
class
,
oid
,
conn
)
//if obj == nil {
// conn.objmu.Unlock()
// return nil, fmt.Errorf("get %s: class %q not supported", Xid{conn.at, oid}, class)
//}
conn
.
objtab
[
oid
]
=
weak
.
NewRef
(
obj
)
conn
.
objtab
[
oid
]
=
weak
.
NewRef
(
obj
)
}
else
{
}
else
{
checkClass
=
true
checkClass
=
true
...
...
go/zodb/persistent.go
View file @
e38e26e2
...
@@ -383,6 +383,7 @@ func newGhost(class string, oid Oid, jar *Connection) IPersistent {
...
@@ -383,6 +383,7 @@ func newGhost(class string, oid Oid, jar *Connection) IPersistent {
var
xpobj
reflect
.
Value
// *typ
var
xpobj
reflect
.
Value
// *typ
zc
:=
classTab
[
class
]
zc
:=
classTab
[
class
]
if
zc
==
nil
{
if
zc
==
nil
{
//return nil
zc
=
brokenZClass
zc
=
brokenZClass
xpobj
=
reflect
.
ValueOf
(
&
Broken
{
class
:
class
})
xpobj
=
reflect
.
ValueOf
(
&
Broken
{
class
:
class
})
}
else
{
}
else
{
...
@@ -439,6 +440,11 @@ func (b *brokenState) SetState(state *mem.Buf) error {
...
@@ -439,6 +440,11 @@ func (b *brokenState) SetState(state *mem.Buf) error {
return
nil
return
nil
}
}
// XXX how to print zodb.Broken("BTrees.IOBTree.IOBTree"), but not long noise for types that don't define GoString?
func
(
b
*
Broken
)
GoString
()
string
{
return
fmt
.
Sprintf
(
"&zodb.Broken(%q)"
,
b
.
class
)
}
// brokenZClass is used for Persistent.zclass for Broken objects.
// brokenZClass is used for Persistent.zclass for Broken objects.
var
brokenZClass
=
&
zclass
{
var
brokenZClass
=
&
zclass
{
class
:
""
,
class
:
""
,
...
...
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