Commit 5e57c1db authored by Toby Dickenson's avatar Toby Dickenson

improved some comments

parent d242261f
......@@ -14,7 +14,7 @@
static char cPersistence_doc_string[] =
"Defines Persistent mixin class for persistent objects.\n"
"\n"
"$Id: cPersistence.c,v 1.53 2002/04/02 06:01:22 jeremy Exp $\n";
"$Id: cPersistence.c,v 1.54 2002/04/02 11:11:45 htrd Exp $\n";
#include "cPersistence.h"
......@@ -190,9 +190,8 @@ deallocated(cPersistentObject *self)
/* XXX should just add this to the C API struct */
v = PyObject_CallMethod((PyObject *)self->cache,
"_oid_unreferenced", "O", self->oid);
/* XXX What does the comment below mean? */
if (v == NULL)
PyErr_Clear(); /* and explode later */
PyErr_Clear(); /* I dont think this should ever happen */
else
Py_DECREF(v);
}
......
......@@ -15,7 +15,7 @@
static char cPickleCache_doc_string[] =
"Defines the PickleCache used by ZODB Connection objects.\n"
"\n"
"$Id: cPickleCache.c,v 1.45 2002/04/02 06:03:39 jeremy Exp $\n";
"$Id: cPickleCache.c,v 1.46 2002/04/02 11:11:45 htrd Exp $\n";
#define ASSIGN(V,E) {PyObject *__e; __e=(E); Py_XDECREF(V); (V)=__e;}
#define UNLESS(E) if(!(E))
......@@ -442,11 +442,16 @@ cc_lru_items(ccobject *self, PyObject *args)
return l;
}
/* XXX What does this function do? */
static PyObject *
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;
if (!PyArg_ParseTuple(args, "O:_oid_unreferenced", &oid))
return NULL;
......
......@@ -14,7 +14,7 @@
static char cPersistence_doc_string[] =
"Defines Persistent mixin class for persistent objects.\n"
"\n"
"$Id: cPersistence.c,v 1.53 2002/04/02 06:01:22 jeremy Exp $\n";
"$Id: cPersistence.c,v 1.54 2002/04/02 11:11:45 htrd Exp $\n";
#include "cPersistence.h"
......@@ -190,9 +190,8 @@ deallocated(cPersistentObject *self)
/* XXX should just add this to the C API struct */
v = PyObject_CallMethod((PyObject *)self->cache,
"_oid_unreferenced", "O", self->oid);
/* XXX What does the comment below mean? */
if (v == NULL)
PyErr_Clear(); /* and explode later */
PyErr_Clear(); /* I dont think this should ever happen */
else
Py_DECREF(v);
}
......
......@@ -15,7 +15,7 @@
static char cPickleCache_doc_string[] =
"Defines the PickleCache used by ZODB Connection objects.\n"
"\n"
"$Id: cPickleCache.c,v 1.45 2002/04/02 06:03:39 jeremy Exp $\n";
"$Id: cPickleCache.c,v 1.46 2002/04/02 11:11:45 htrd Exp $\n";
#define ASSIGN(V,E) {PyObject *__e; __e=(E); Py_XDECREF(V); (V)=__e;}
#define UNLESS(E) if(!(E))
......@@ -442,11 +442,16 @@ cc_lru_items(ccobject *self, PyObject *args)
return l;
}
/* XXX What does this function do? */
static PyObject *
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;
if (!PyArg_ParseTuple(args, "O:_oid_unreferenced", &oid))
return NULL;
......
......@@ -14,7 +14,7 @@
static char cPersistence_doc_string[] =
"Defines Persistent mixin class for persistent objects.\n"
"\n"
"$Id: cPersistence.c,v 1.53 2002/04/02 06:01:22 jeremy Exp $\n";
"$Id: cPersistence.c,v 1.54 2002/04/02 11:11:45 htrd Exp $\n";
#include "cPersistence.h"
......@@ -190,9 +190,8 @@ deallocated(cPersistentObject *self)
/* XXX should just add this to the C API struct */
v = PyObject_CallMethod((PyObject *)self->cache,
"_oid_unreferenced", "O", self->oid);
/* XXX What does the comment below mean? */
if (v == NULL)
PyErr_Clear(); /* and explode later */
PyErr_Clear(); /* I dont think this should ever happen */
else
Py_DECREF(v);
}
......
......@@ -15,7 +15,7 @@
static char cPickleCache_doc_string[] =
"Defines the PickleCache used by ZODB Connection objects.\n"
"\n"
"$Id: cPickleCache.c,v 1.45 2002/04/02 06:03:39 jeremy Exp $\n";
"$Id: cPickleCache.c,v 1.46 2002/04/02 11:11:45 htrd Exp $\n";
#define ASSIGN(V,E) {PyObject *__e; __e=(E); Py_XDECREF(V); (V)=__e;}
#define UNLESS(E) if(!(E))
......@@ -442,11 +442,16 @@ cc_lru_items(ccobject *self, PyObject *args)
return l;
}
/* XXX What does this function do? */
static PyObject *
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;
if (!PyArg_ParseTuple(args, "O:_oid_unreferenced", &oid))
return NULL;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment