[Zodb-checkins] CVS: ZODB3/ZODB - DemoStorage.py:1.18.12.3
Jeremy Hylton
jeremy at zope.com
Thu Jul 10 14:45:59 EDT 2003
Update of /cvs-repository/ZODB3/ZODB
In directory cvs.zope.org:/tmp/cvs-serv28190
Modified Files:
Tag: zodb33-devel-branch
DemoStorage.py
Log Message:
Switch back to using BTrees!
=== ZODB3/ZODB/DemoStorage.py 1.18.12.2 => 1.18.12.3 ===
--- ZODB3/ZODB/DemoStorage.py:1.18.12.2 Thu Jul 3 17:47:33 2003
+++ ZODB3/ZODB/DemoStorage.py Thu Jul 10 13:45:52 2003
@@ -93,8 +93,7 @@
BaseStorage.BaseStorage.__init__(self, name, base)
# We use a BTree because the items are sorted!
-## self._data=OOBTree.OOBTree()
- self._data = {}
+ self._data=OOBTree.OOBTree()
self._index={}
self._vindex={}
self._base=base
@@ -165,12 +164,13 @@
self._lock_acquire()
try:
- v=self._vindex.get(src, None)
- if v is None: return
+ v = self._vindex.get(src)
+ if v is None:
+ return
newserial = self._serial
- tindex=self._tindex
- oids=[]
+ tindex = self._tindex
+ oids = []
for r in v.values():
oid, serial, pre, vdata, p = r
assert vdata is not None
@@ -181,10 +181,10 @@
new_vdata = None
tindex.append([oid, newserial, r, new_vdata, p])
-
return oids
- finally: self._lock_release()
+ finally:
+ self._lock_release()
def load(self, oid, version):
self._lock_acquire()
More information about the Zodb-checkins
mailing list