[Zope-Checkins] SVN: Zope/branches/ajung-indexes-desuxing-branch/lib/python/Products/PluginIndexes/Date clear() needs to reset the _length attribute

Andreas Jung andreas at andreas-jung.com
Mon Jan 31 13:28:46 EST 2005


Log message for revision 28994:
  clear() needs to reset the _length attribute
  

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

-=-
Modified: Zope/branches/ajung-indexes-desuxing-branch/lib/python/Products/PluginIndexes/DateIndex/DateIndex.py
===================================================================
--- Zope/branches/ajung-indexes-desuxing-branch/lib/python/Products/PluginIndexes/DateIndex/DateIndex.py	2005-01-31 17:24:21 UTC (rev 28993)
+++ Zope/branches/ajung-indexes-desuxing-branch/lib/python/Products/PluginIndexes/DateIndex/DateIndex.py	2005-01-31 18:28:46 UTC (rev 28994)
@@ -98,8 +98,8 @@
         """ Complete reset """
         self._index = IOBTree()
         self._unindex = OIBTree()
+        self._length.set(0)
 
-
     def index_object( self, documentId, obj, threshold=None ):
         """index an object, normalizing the indexed value to an integer
 

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 17:24:21 UTC (rev 28993)
+++ Zope/branches/ajung-indexes-desuxing-branch/lib/python/Products/PluginIndexes/DateRangeIndex/DateRangeIndex.py	2005-01-31 18:28:46 UTC (rev 28994)
@@ -136,6 +136,7 @@
         self._since         = IOBTree()
         self._until         = IOBTree()
         self._unindex       = IOBTree() # 'datum' will be a tuple of date ints
+        self._length.set(0)
 
     #
     #   PluggableIndexInterface implementation (XXX inherit assertions?)



More information about the Zope-Checkins mailing list