Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
ZEO
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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
ZEO
Commits
5e57c1db
Commit
5e57c1db
authored
Apr 02, 2002
by
Toby Dickenson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
improved some comments
parent
d242261f
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
30 additions
and
18 deletions
+30
-18
src/Persistence/cPersistence.c
src/Persistence/cPersistence.c
+2
-3
src/Persistence/cPickleCache.c
src/Persistence/cPickleCache.c
+8
-3
src/ZODB/cPersistence.c
src/ZODB/cPersistence.c
+2
-3
src/ZODB/cPickleCache.c
src/ZODB/cPickleCache.c
+8
-3
src/persistent/cPersistence.c
src/persistent/cPersistence.c
+2
-3
src/persistent/cPickleCache.c
src/persistent/cPickleCache.c
+8
-3
No files found.
src/Persistence/cPersistence.c
View file @
5e57c1db
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
static
char
cPersistence_doc_string
[]
=
static
char
cPersistence_doc_string
[]
=
"Defines Persistent mixin class for persistent objects.
\n
"
"Defines Persistent mixin class for persistent objects.
\n
"
"
\n
"
"
\n
"
"$Id: cPersistence.c,v 1.5
3 2002/04/02 06:01:22 jeremy
Exp $
\n
"
;
"$Id: cPersistence.c,v 1.5
4 2002/04/02 11:11:45 htrd
Exp $
\n
"
;
#include "cPersistence.h"
#include "cPersistence.h"
...
@@ -190,9 +190,8 @@ deallocated(cPersistentObject *self)
...
@@ -190,9 +190,8 @@ deallocated(cPersistentObject *self)
/* XXX should just add this to the C API struct */
/* XXX should just add this to the C API struct */
v
=
PyObject_CallMethod
((
PyObject
*
)
self
->
cache
,
v
=
PyObject_CallMethod
((
PyObject
*
)
self
->
cache
,
"_oid_unreferenced"
,
"O"
,
self
->
oid
);
"_oid_unreferenced"
,
"O"
,
self
->
oid
);
/* XXX What does the comment below mean? */
if
(
v
==
NULL
)
if
(
v
==
NULL
)
PyErr_Clear
();
/*
and explode later
*/
PyErr_Clear
();
/*
I dont think this should ever happen
*/
else
else
Py_DECREF
(
v
);
Py_DECREF
(
v
);
}
}
...
...
src/Persistence/cPickleCache.c
View file @
5e57c1db
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
static
char
cPickleCache_doc_string
[]
=
static
char
cPickleCache_doc_string
[]
=
"Defines the PickleCache used by ZODB Connection objects.
\n
"
"Defines the PickleCache used by ZODB Connection objects.
\n
"
"
\n
"
"
\n
"
"$Id: cPickleCache.c,v 1.4
5 2002/04/02 06:03:39 jeremy
Exp $
\n
"
;
"$Id: cPickleCache.c,v 1.4
6 2002/04/02 11:11:45 htrd
Exp $
\n
"
;
#define ASSIGN(V,E) {PyObject *__e; __e=(E); Py_XDECREF(V); (V)=__e;}
#define ASSIGN(V,E) {PyObject *__e; __e=(E); Py_XDECREF(V); (V)=__e;}
#define UNLESS(E) if(!(E))
#define UNLESS(E) if(!(E))
...
@@ -442,11 +442,16 @@ cc_lru_items(ccobject *self, PyObject *args)
...
@@ -442,11 +442,16 @@ cc_lru_items(ccobject *self, PyObject *args)
return
l
;
return
l
;
}
}
/* XXX What does this function do? */
static
PyObject
*
static
PyObject
*
cc_oid_unreferenced
(
ccobject
*
self
,
PyObject
*
args
)
cc_oid_unreferenced
(
ccobject
*
self
,
PyObject
*
args
)
{
{
/* This is called by the persistent object deallocation
function when the reference count on a persistent
object reaches zero. We need to fix up our dictionary;
its reference is now dangling because we stole its
reference count. Be careful to not release the global
interpreter lock until this is complete. */
PyObject
*
oid
,
*
v
;
PyObject
*
oid
,
*
v
;
if
(
!
PyArg_ParseTuple
(
args
,
"O:_oid_unreferenced"
,
&
oid
))
if
(
!
PyArg_ParseTuple
(
args
,
"O:_oid_unreferenced"
,
&
oid
))
return
NULL
;
return
NULL
;
...
...
src/ZODB/cPersistence.c
View file @
5e57c1db
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
static
char
cPersistence_doc_string
[]
=
static
char
cPersistence_doc_string
[]
=
"Defines Persistent mixin class for persistent objects.
\n
"
"Defines Persistent mixin class for persistent objects.
\n
"
"
\n
"
"
\n
"
"$Id: cPersistence.c,v 1.5
3 2002/04/02 06:01:22 jeremy
Exp $
\n
"
;
"$Id: cPersistence.c,v 1.5
4 2002/04/02 11:11:45 htrd
Exp $
\n
"
;
#include "cPersistence.h"
#include "cPersistence.h"
...
@@ -190,9 +190,8 @@ deallocated(cPersistentObject *self)
...
@@ -190,9 +190,8 @@ deallocated(cPersistentObject *self)
/* XXX should just add this to the C API struct */
/* XXX should just add this to the C API struct */
v
=
PyObject_CallMethod
((
PyObject
*
)
self
->
cache
,
v
=
PyObject_CallMethod
((
PyObject
*
)
self
->
cache
,
"_oid_unreferenced"
,
"O"
,
self
->
oid
);
"_oid_unreferenced"
,
"O"
,
self
->
oid
);
/* XXX What does the comment below mean? */
if
(
v
==
NULL
)
if
(
v
==
NULL
)
PyErr_Clear
();
/*
and explode later
*/
PyErr_Clear
();
/*
I dont think this should ever happen
*/
else
else
Py_DECREF
(
v
);
Py_DECREF
(
v
);
}
}
...
...
src/ZODB/cPickleCache.c
View file @
5e57c1db
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
static
char
cPickleCache_doc_string
[]
=
static
char
cPickleCache_doc_string
[]
=
"Defines the PickleCache used by ZODB Connection objects.
\n
"
"Defines the PickleCache used by ZODB Connection objects.
\n
"
"
\n
"
"
\n
"
"$Id: cPickleCache.c,v 1.4
5 2002/04/02 06:03:39 jeremy
Exp $
\n
"
;
"$Id: cPickleCache.c,v 1.4
6 2002/04/02 11:11:45 htrd
Exp $
\n
"
;
#define ASSIGN(V,E) {PyObject *__e; __e=(E); Py_XDECREF(V); (V)=__e;}
#define ASSIGN(V,E) {PyObject *__e; __e=(E); Py_XDECREF(V); (V)=__e;}
#define UNLESS(E) if(!(E))
#define UNLESS(E) if(!(E))
...
@@ -442,11 +442,16 @@ cc_lru_items(ccobject *self, PyObject *args)
...
@@ -442,11 +442,16 @@ cc_lru_items(ccobject *self, PyObject *args)
return
l
;
return
l
;
}
}
/* XXX What does this function do? */
static
PyObject
*
static
PyObject
*
cc_oid_unreferenced
(
ccobject
*
self
,
PyObject
*
args
)
cc_oid_unreferenced
(
ccobject
*
self
,
PyObject
*
args
)
{
{
/* This is called by the persistent object deallocation
function when the reference count on a persistent
object reaches zero. We need to fix up our dictionary;
its reference is now dangling because we stole its
reference count. Be careful to not release the global
interpreter lock until this is complete. */
PyObject
*
oid
,
*
v
;
PyObject
*
oid
,
*
v
;
if
(
!
PyArg_ParseTuple
(
args
,
"O:_oid_unreferenced"
,
&
oid
))
if
(
!
PyArg_ParseTuple
(
args
,
"O:_oid_unreferenced"
,
&
oid
))
return
NULL
;
return
NULL
;
...
...
src/persistent/cPersistence.c
View file @
5e57c1db
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
static
char
cPersistence_doc_string
[]
=
static
char
cPersistence_doc_string
[]
=
"Defines Persistent mixin class for persistent objects.
\n
"
"Defines Persistent mixin class for persistent objects.
\n
"
"
\n
"
"
\n
"
"$Id: cPersistence.c,v 1.5
3 2002/04/02 06:01:22 jeremy
Exp $
\n
"
;
"$Id: cPersistence.c,v 1.5
4 2002/04/02 11:11:45 htrd
Exp $
\n
"
;
#include "cPersistence.h"
#include "cPersistence.h"
...
@@ -190,9 +190,8 @@ deallocated(cPersistentObject *self)
...
@@ -190,9 +190,8 @@ deallocated(cPersistentObject *self)
/* XXX should just add this to the C API struct */
/* XXX should just add this to the C API struct */
v
=
PyObject_CallMethod
((
PyObject
*
)
self
->
cache
,
v
=
PyObject_CallMethod
((
PyObject
*
)
self
->
cache
,
"_oid_unreferenced"
,
"O"
,
self
->
oid
);
"_oid_unreferenced"
,
"O"
,
self
->
oid
);
/* XXX What does the comment below mean? */
if
(
v
==
NULL
)
if
(
v
==
NULL
)
PyErr_Clear
();
/*
and explode later
*/
PyErr_Clear
();
/*
I dont think this should ever happen
*/
else
else
Py_DECREF
(
v
);
Py_DECREF
(
v
);
}
}
...
...
src/persistent/cPickleCache.c
View file @
5e57c1db
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
static
char
cPickleCache_doc_string
[]
=
static
char
cPickleCache_doc_string
[]
=
"Defines the PickleCache used by ZODB Connection objects.
\n
"
"Defines the PickleCache used by ZODB Connection objects.
\n
"
"
\n
"
"
\n
"
"$Id: cPickleCache.c,v 1.4
5 2002/04/02 06:03:39 jeremy
Exp $
\n
"
;
"$Id: cPickleCache.c,v 1.4
6 2002/04/02 11:11:45 htrd
Exp $
\n
"
;
#define ASSIGN(V,E) {PyObject *__e; __e=(E); Py_XDECREF(V); (V)=__e;}
#define ASSIGN(V,E) {PyObject *__e; __e=(E); Py_XDECREF(V); (V)=__e;}
#define UNLESS(E) if(!(E))
#define UNLESS(E) if(!(E))
...
@@ -442,11 +442,16 @@ cc_lru_items(ccobject *self, PyObject *args)
...
@@ -442,11 +442,16 @@ cc_lru_items(ccobject *self, PyObject *args)
return
l
;
return
l
;
}
}
/* XXX What does this function do? */
static
PyObject
*
static
PyObject
*
cc_oid_unreferenced
(
ccobject
*
self
,
PyObject
*
args
)
cc_oid_unreferenced
(
ccobject
*
self
,
PyObject
*
args
)
{
{
/* This is called by the persistent object deallocation
function when the reference count on a persistent
object reaches zero. We need to fix up our dictionary;
its reference is now dangling because we stole its
reference count. Be careful to not release the global
interpreter lock until this is complete. */
PyObject
*
oid
,
*
v
;
PyObject
*
oid
,
*
v
;
if
(
!
PyArg_ParseTuple
(
args
,
"O:_oid_unreferenced"
,
&
oid
))
if
(
!
PyArg_ParseTuple
(
args
,
"O:_oid_unreferenced"
,
&
oid
))
return
NULL
;
return
NULL
;
...
...
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