mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
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.
This commit is contained in:
parent
74109a149e
commit
3f36a085fe
1 changed files with 1 additions and 1 deletions
|
@ -79,7 +79,7 @@ class _Database:
|
||||||
def _addval(self, val):
|
def _addval(self, val):
|
||||||
f = _open(self._datfile, 'rb+')
|
f = _open(self._datfile, 'rb+')
|
||||||
f.seek(0, 2)
|
f.seek(0, 2)
|
||||||
pos = f.tell()
|
pos = int(f.tell())
|
||||||
## Does not work under MW compiler
|
## Does not work under MW compiler
|
||||||
## pos = ((pos + _BLOCKSIZE - 1) / _BLOCKSIZE) * _BLOCKSIZE
|
## pos = ((pos + _BLOCKSIZE - 1) / _BLOCKSIZE) * _BLOCKSIZE
|
||||||
## f.seek(pos)
|
## f.seek(pos)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue