Commit 48249b5d authored by Andreas Jung's avatar Andreas Jung

fixes for _length

parent 054cc497
......@@ -25,6 +25,7 @@ from OFS.SimpleItem import SimpleItem
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 @@ class DateRangeIndex(UnIndex):
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?)
......
......@@ -99,6 +99,7 @@ class UnIndex(SimpleItem):
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 @@ class UnIndex(SimpleItem):
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.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment