diff options
author | Guido van Rossum <guido@python.org> | 1999-04-27 12:21:17 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1999-04-27 12:21:17 (GMT) |
commit | 3f36a085feeba6217f791d683021816fa513c01f (patch) | |
tree | 94017a3cb4f4cf0844d2b0bd7252f4a749e1a4eb /Lib/dumbdbm.py | |
parent | 74109a149eecb7bd31206afb9747ca6b3ebb5906 (diff) | |
download | cpython-3f36a085feeba6217f791d683021816fa513c01f.zip cpython-3f36a085feeba6217f791d683021816fa513c01f.tar.gz cpython-3f36a085feeba6217f791d683021816fa513c01f.tar.bz2 |
Cast f.tell() result to int() in _addval(), so it works even on
platforms where tell() returns a long. (Perhaps tell() should be
fixed too?) Reported by Greg Humphreys.
Diffstat (limited to 'Lib/dumbdbm.py')
-rw-r--r-- | Lib/dumbdbm.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/dumbdbm.py b/Lib/dumbdbm.py index 0ae1e82..200bc7f 100644 --- a/Lib/dumbdbm.py +++ b/Lib/dumbdbm.py @@ -79,7 +79,7 @@ class _Database: def _addval(self, val): f = _open(self._datfile, 'rb+') f.seek(0, 2) - pos = f.tell() + pos = int(f.tell()) ## Does not work under MW compiler ## pos = ((pos + _BLOCKSIZE - 1) / _BLOCKSIZE) * _BLOCKSIZE ## f.seek(pos) |