Commit 4171baa3 authored by Guido van Rossum's avatar Guido van Rossum

Use fsIndex() for the index, if it exists. This completes the merge

of the StandaloneZODB-1_0-branch into the trunk.  The
StandaloneZODB-1_0-branch is now dead!
parent 9c54f093
......@@ -115,7 +115,7 @@
# may have a back pointer to a version record or to a non-version
# record.
#
__version__='$Revision: 1.81 $'[11:-2]
__version__='$Revision: 1.82 $'[11:-2]
import struct, time, os, string, base64, sys
from struct import pack, unpack
......@@ -130,6 +130,12 @@ import BaseStorage
from cPickle import Pickler, Unpickler, loads
import ConflictResolution
try:
from fsIndex import fsIndex
except ImportError:
def fsIndex():
return {}
try: from posix import fsync
except: fsync=None
......@@ -1327,7 +1333,7 @@ class FileStorage(BaseStorage.BaseStorage,
rootl=[z64]
pop=rootl.pop
pindex={}
pindex=fsIndex()
referenced=pindex.has_key
_load=self._load
_loada=self._loada
......@@ -1357,7 +1363,7 @@ class FileStorage(BaseStorage.BaseStorage,
# Index for non-version data. This is a temporary structure
# to reduce I/O during packing
nvindex={}
nvindex=fsIndex()
# Cache a bunch of methods
seek=file.seek
......
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