[Zodb-checkins] CVS: Packages/bsddb3Storage - Full.py:1.18
barry@digicool.com
barry@digicool.com
Wed, 18 Apr 2001 15:39:07 -0400 (EDT)
Update of /cvs-repository/Packages/bsddb3Storage
In directory korak:/tmp/cvs-serv4011
Modified Files:
Full.py
Log Message:
gcReferences(): Tim rightly points out that we shouldn't be filtering
out duplicate oids. If a pickle holds multiple references to an
object, that object's oids will show up multiple times in the returned
list.
--- Updated File Full.py in package Packages/bsddb3Storage --
--- Full.py 2001/04/18 10:42:17 1.17
+++ Full.py 2001/04/18 19:39:07 1.18
@@ -994,7 +994,7 @@
Raises KeyError if there is no object with oid. The oid argument
is an integer; the return value is a list of integers of oids.
"""
- oids = {}
+ oids = []
c = None
self._lock_acquire()
try:
@@ -1007,10 +1007,10 @@
# Sniff the pickle for object references
tmpoids = []
referencesf(pickle, tmpoids)
+ # Convert to unsigned longs
+ oids.extend(map(utils.U64, tmpoids))
# Make sure there's no duplicates, and convert to int
- for oid in tmpoids:
- oids[utils.U64(oid)] = 1
- return oids.keys()
+ return oids
finally:
if c:
c.close()