[Patches] [ python-Patches-416251 ] 2.1c1 mmapmodule: unused vrbl cleanup
noreply@sourceforge.net
noreply@sourceforge.net
Wed, 09 May 2001 13:25:56 -0700
Patches item #416251, was updated on 2001-04-15 04:26
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=416251&group_id=5470
Category: Modules
Group: None
Status: Open
Resolution: Fixed
Priority: 5
Submitted By: Mark Favas (mfavas)
>Assigned to: Fred L. Drake, Jr. (fdrake)
Summary: 2.1c1 mmapmodule: unused vrbl cleanup
Initial Comment:
Variable set but unused
*** mmapmodule.c.orig Sun Apr 15 18:37:16 2001
--- mmapmodule.c Sun Apr 15 18:38:43 2001
***************
*** 163,169 ****
mmap_read_byte_method(mmap_object *self,
PyObject *args)
{
- char value;
char *where;
CHECK_VALID(NULL);
if (!PyArg_ParseTuple(args, ":read_byte"))
--- 163,168 ----
***************
*** 170,176 ****
return NULL;
if (self->pos < self->size) {
where = self->data + self->pos;
- value = (char) *(where);
self->pos += 1;
return Py_BuildValue("c", (char)
*(where));
} else {
--- 169,174 ----
----------------------------------------------------------------------
>Comment By: Tim Peters (tim_one)
Date: 2001-05-09 13:25
Message:
Logged In: YES
user_id=31435
Could you please look at the "before" and "after" code and
try to guess why?
----------------------------------------------------------------------
Comment By: Fred L. Drake, Jr. (fdrake)
Date: 2001-05-09 12:39
Message:
Logged In: YES
user_id=3066
Reopening -- the fix introduced breakage on Linux (kernel
2.2.17):
cj42289-a(.../python/linux-beowolf); ./python
../Lib/test/regrtest.py -v test_mmap
test_mmap
test_mmap
test test_mmap crashed -- exceptions.IOError: [Errno 22]
Invalid argument
Traceback (most recent call last):
File "../Lib/test/regrtest.py", line 246, in runtest
__import__(test, globals(), locals(), [])
File "../Lib/test/test_mmap.py", line 124, in ?
test_both()
File "../Lib/test/test_mmap.py", line 14, in test_both
f.write('\0'* PAGESIZE)
IOError: [Errno 22] Invalid argument
1 test failed: test_mmap
----------------------------------------------------------------------
Comment By: Tim Peters (tim_one)
Date: 2001-05-09 11:48
Message:
Logged In: YES
user_id=31435
Checked in a similar change, to mmapmodule.c rev 2.29.
----------------------------------------------------------------------
You can respond by visiting:
http://sourceforge.net/tracker/?func=detail&atid=305470&aid=416251&group_id=5470