[Zodb-checkins] CVS: ZODB3/BDBStorage - BerkeleyBase.py:1.39
Barry Warsaw
barry@wooz.org
Mon, 20 Jan 2003 17:16:25 -0500
Update of /cvs-repository/ZODB3/BDBStorage
In directory cvs.zope.org:/tmp/cvs-serv12159
Modified Files:
BerkeleyBase.py
Log Message:
Get ZERO from the package.
Remove __version__
=== ZODB3/BDBStorage/BerkeleyBase.py 1.38 => 1.39 ===
--- ZODB3/BDBStorage/BerkeleyBase.py:1.38 Fri Jan 3 17:47:09 2003
+++ ZODB3/BDBStorage/BerkeleyBase.py Mon Jan 20 17:16:21 2003
@@ -1,6 +1,6 @@
##############################################################################
#
-# Copyright (c) 2001, 2002 Zope Corporation and Contributors.
+# Copyright (c) 2001 Zope Corporation and Contributors.
# All Rights Reserved.
#
# This software is subject to the provisions of the Zope Public License,
@@ -14,7 +14,6 @@
"""Base class for BerkeleyStorage implementations.
"""
-__version__ = '$Revision$'.split()[-2:][0]
import os
import time
@@ -25,7 +24,7 @@
# This uses the Dunn/Kuchling PyBSDDB v3 extension module available from
# http://pybsddb.sourceforge.net
-from BDBStorage import db
+from BDBStorage import db, ZERO
# BaseStorage provides primitives for lock acquisition and release, and a host
# of other methods, some of which are overridden here, some of which are not.
@@ -289,7 +288,7 @@
if value:
self._oid = value[0]
else:
- self._oid = '\0\0\0\0\0\0\0\0'
+ self._oid = ZERO
# It can be very expensive to calculate the "length" of the database, so
# we cache the length and adjust it as we add and remove objects.
@@ -403,6 +402,7 @@
self._env.close()
os.unlink(lockfile)
+ # A couple of convenience methods
def _update(self, deltas, data, incdec):
refdoids = []
referencesf(data, refdoids)