[Python-bugs-list] tell() returning long (PR#37)

guido@CNRI.Reston.VA.US guido@CNRI.Reston.VA.US
Wed, 28 Jul 1999 12:26:10 -0400 (EDT)


This was reported and fixed soon after Python 1.5.2 came out.  The fix
tro dumbdbm.oy is available from the CVS archives at
http://www.python.org/download/cvs.html.  I repeat it here for your
convenience:

Index: dumbdbm.py
===================================================================
RCS file: /projects/cvsroot/python/dist/src/Lib/dumbdbm.py,v
retrieving revision 1.3
retrieving revision 1.4
diff -c -r1.3 -r1.4
*** dumbdbm.py	1996/05/28 22:58:40	1.3
--- dumbdbm.py	1999/04/27 12:21:17	1.4
***************
*** 79,85 ****
  	def _addval(self, val):
  		f = _open(self._datfile, 'rb+')
  		f.seek(0, 2)
! 		pos = f.tell()
  ## Does not work under MW compiler
  ##		pos = ((pos + _BLOCKSIZE - 1) / _BLOCKSIZE) * _BLOCKSIZE
  ##		f.seek(pos)
--- 79,85 ----
  	def _addval(self, val):
  		f = _open(self._datfile, 'rb+')
  		f.seek(0, 2)
! 		pos = int(f.tell())
  ## Does not work under MW compiler
  ##		pos = ((pos + _BLOCKSIZE - 1) / _BLOCKSIZE) * _BLOCKSIZE
  ##		f.seek(pos)


--Guido van Rossum (home page: http://www.python.org/~guido/)