Commit 8c081bef authored by Tim Peters's avatar Tim Peters

Merge rev 37574 from 3.4 branch.

makeroom():  Simplify retrieve+del from filemap.
parent f47937f6
...@@ -472,12 +472,7 @@ class CircularCacheSimulation(Simulation): ...@@ -472,12 +472,7 @@ class CircularCacheSimulation(Simulation):
pos = self.offset pos = self.offset
while need > 0: while need > 0:
assert pos < self.cachelimit assert pos < self.cachelimit
try: size, e = self.filemap.pop(pos)
size, e = self.filemap[pos]
except KeyError:
self.dump()
raise
del self.filemap[pos]
if e: # there is an object here (else it's already free space) if e: # there is an object here (else it's already free space)
self.evicts += 1 self.evicts += 1
self.total_evicts += 1 self.total_evicts += 1
......
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