[Zope-Checkins] SVN: Zope/branches/ajung-indexes-desuxing-branch/lib/python/Products/PluginIndexes/ fixes for _length

Andreas Jung andreas at andreas-jung.com
Mon Jan 31 13:38:34 EST 2005


Log message for revision 28995:
  fixes for _length
  

Changed:
  U   Zope/branches/ajung-indexes-desuxing-branch/lib/python/Products/PluginIndexes/DateRangeIndex/DateRangeIndex.py
  U   Zope/branches/ajung-indexes-desuxing-branch/lib/python/Products/PluginIndexes/common/UnIndex.py

-=-
Modified: Zope/branches/ajung-indexes-desuxing-branch/lib/python/Products/PluginIndexes/DateRangeIndex/DateRangeIndex.py
===================================================================
--- Zope/branches/ajung-indexes-desuxing-branch/lib/python/Products/PluginIndexes/DateRangeIndex/DateRangeIndex.py	2005-01-31 18:28:46 UTC (rev 28994)
+++ Zope/branches/ajung-indexes-desuxing-branch/lib/python/Products/PluginIndexes/DateRangeIndex/DateRangeIndex.py	2005-01-31 18:38:33 UTC (rev 28995)
@@ -25,6 +25,7 @@
 
 from BTrees.IOBTree import IOBTree
 from BTrees.IIBTree import IISet, IITreeSet, union, intersection, multiunion
+import BTrees.Length
 
 from Globals import package_home, DTMLFile, InitializeClass
 from AccessControl import ClassSecurityInfo
@@ -136,7 +137,7 @@
         self._since         = IOBTree()
         self._until         = IOBTree()
         self._unindex       = IOBTree() # 'datum' will be a tuple of date ints
-        self._length.set(0)
+        self._length        = BTrees.Length.Length()
 
     #
     #   PluggableIndexInterface implementation (XXX inherit assertions?)

Modified: Zope/branches/ajung-indexes-desuxing-branch/lib/python/Products/PluginIndexes/common/UnIndex.py
===================================================================
--- Zope/branches/ajung-indexes-desuxing-branch/lib/python/Products/PluginIndexes/common/UnIndex.py	2005-01-31 18:28:46 UTC (rev 28994)
+++ Zope/branches/ajung-indexes-desuxing-branch/lib/python/Products/PluginIndexes/common/UnIndex.py	2005-01-31 18:38:33 UTC (rev 28995)
@@ -99,6 +99,7 @@
     def clear(self):
         self._index = OOBTree()
         self._unindex = IOBTree()
+        self._length.set(0)
 
     def __nonzero__(self):
         return not not self._unindex
@@ -203,7 +204,7 @@
         returnStatus = 0
 
         # First we need to see if there's anything interesting to look at
-        datum = self._get_object_datum(obj, attr)
+        datum = self._get_object_datum(obj, attr)                        
 
         # We don't want to do anything that we don't have to here, so we'll
         # check to see if the new and existing information is the same.



More information about the Zope-Checkins mailing list