Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZODB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Nicolas Wavrant
ZODB
Commits
35d1e1c0
Commit
35d1e1c0
authored
Dec 12, 2002
by
Jeremy Hylton
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add comment explaining contract of persistent_id_call().
parent
bc0fdca4
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
1 deletion
+17
-1
src/ZODB/coptimizations.c
src/ZODB/coptimizations.c
+17
-1
No files found.
src/ZODB/coptimizations.c
View file @
35d1e1c0
...
...
@@ -14,7 +14,7 @@
static
char
coptimizations_doc_string
[]
=
"C optimization for new_persistent_id().
\n
"
"
\n
"
"$Id: coptimizations.c,v 1.2
1 2002/12/12 18:52:21
jeremy Exp $
\n
"
;
"$Id: coptimizations.c,v 1.2
2 2002/12/12 19:02:07
jeremy Exp $
\n
"
;
#include "Python.h"
#define DONT_USE_CPERSISTENCECAPI
...
...
@@ -153,6 +153,22 @@ set_oid(persistent_id *self, PyObject *object)
return
NULL
;
}
/* persistent_id_call()
Returns a reference to a persistent object, appending it to the the
persistent_id's list of objects. If a non-persistent object is
found, return None.
The returned reference can be either class info, oid pair or a
plain old oid. If it is a pair, the class info is the module and
the name of the class. The class info can be used to create a
ghost without loading the class.
For unusual objects, e.g. ZClasses, return just the oid. An object
is unusual if it isn't an ExtensionClass, because that means it
doesn't inherit from Persistence, or if it has __getinitargs__().
*/
static
PyObject
*
persistent_id_call
(
persistent_id
*
self
,
PyObject
*
args
,
PyObject
*
kwargs
)
{
...
...
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