[Zope3-checkins] CVS: Zope3/src/persistent - cPickleCache.c:1.92

Jeremy Hylton jeremy at zope.com
Sat Mar 13 02:48:43 EST 2004


Update of /cvs-repository/Zope3/src/persistent
In directory cvs.zope.org:/tmp/cvs-serv29469/src/persistent

Modified Files:
	cPickleCache.c 
Log Message:
Revise Connection.

Make _added_during_commit a regular instance variable.  Don't use
try/finally to reset it; just clear it at the start of a transaction.
XXX There was a test that needed to be removed, but it seemed to be
just a shallow test that try/finally was used.  Can't see any feature
that depends on specific of error handling: The txn is going to abort.

Remove unused _opened instance variable.
Split commit() into two smaller parts.
Get rid of extra manipulation of _creating.
Don't look for _p_serial of None; z64 is now required.
Undo local variable aliases in subtransaction methods.

Also, trivial change to pickle cache API -- get() works like dict get().


=== Zope3/src/persistent/cPickleCache.c 1.91 => 1.92 ===
--- Zope3/src/persistent/cPickleCache.c:1.91	Tue Mar  2 17:13:54 2004
+++ Zope3/src/persistent/cPickleCache.c	Sat Mar 13 02:48:12 2004
@@ -408,12 +408,10 @@
 
     r = PyDict_GetItem(self->data, key);
     if (!r) {
-	if (d) {
+	if (d)
 	    r = d;
-	} else {
-	    PyErr_SetObject(PyExc_KeyError, key);
-	    return NULL;
-	}
+	else
+	    r = Py_None;
     }
     Py_INCREF(r);
     return r;




More information about the Zope3-Checkins mailing list