##// END OF EJS Templates
nodemap: move the iteratio inside the Block object...
marmoute -
r44797:55b12f25 default
parent child Browse files
Show More
@@ -221,6 +221,9 b' class Block(dict):'
221
221
222 contains up to 16 entry indexed from 0 to 15"""
222 contains up to 16 entry indexed from 0 to 15"""
223
223
224 def __iter__(self):
225 return iter(self.get(i) for i in range(16))
226
224
227
225 def _build_trie(index):
228 def _build_trie(index):
226 """build a nodemap trie
229 """build a nodemap trie
@@ -295,7 +298,7 b' def _persist_block(block_node, block_map'
295 Children block are assumed to be already persisted and present in
298 Children block are assumed to be already persisted and present in
296 block_map.
299 block_map.
297 """
300 """
298 data = tuple(_to_value(block_node.get(i), block_map) for i in range(16))
301 data = tuple(_to_value(v, block_map) for v in block_node)
299 return S_BLOCK.pack(*data)
302 return S_BLOCK.pack(*data)
300
303
301
304
General Comments 0
You need to be logged in to leave comments. Login now