Commit 151a018d authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 4d2e469c
......@@ -226,7 +226,7 @@ def Restructure(ztree, newStructure):
ztreeType = type(ztree)
zbucketType = ztreeType._bucket_type
_bcheck(ztree) # verify ztree before our tweaks
_zbcheck(ztree) # verify ztree before our tweaks
print()
# dict with all k->v from ztree
......@@ -471,7 +471,7 @@ def Restructure(ztree, newStructure):
print('new struct:')
print(StructureOf(ztree))
print()
_bcheck(ztree) # verify ztree after our tweaks
_zbcheck(ztree) # verify ztree after our tweaks
tstruct = StructureOf(ztree)
if tstruct != newStructure:
panic("BUG: Restructure: result structure is not what was"
......@@ -559,12 +559,8 @@ def _keyvSliceBy(keyv, klo, khi):
return list([k for k in keyv if (klo <= k < khi)])
# _iterSplitByN iterates through all nsplit splitting of [lo, hi) range.
# hi > lo
# XXX nsplit > ...
# lo < si < hi
# si < s_{i+1}
#
# XXX remove lo and hi from the output?
# lo < si < s_{i+1} < hi
def _iterSplitByN(lo, hi, nsplit): # -> i[] of [lo, s1, s2, ..., sn, hi)
assert lo <= hi
assert nsplit >= 0
......@@ -578,7 +574,6 @@ def _iterSplitByN(lo, hi, nsplit): # -> i[] of [lo, s1, s2, ..., sn, hi)
yield [lo] + tail
# ---- topology encoding ----
# TopoEncode returns topology encoding for internal structure of the tree.
......@@ -833,10 +828,10 @@ def _zclassify(znode): # -> _ZNodeType
return _
# _bcheck performs full consistency checks on ztree provided by ZODB.
# _zbcheck performs full consistency checks on ztree provided by ZODB.
#
# The checks are what is provided by BTree.check and node._check().
def _bcheck(ztree):
def _zbcheck(ztree):
# verify internal C-level pointers consistency.
#
# Only valid to be called on root node and verifies whole tree.
......
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