Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 1ef4e2d

Browse files
committed
Mark Hammond <[email protected]>:
This patch fixes the mmap module on Windows 9x.
1 parent aaa8bb4 commit 1ef4e2d

1 file changed

Lines changed: 2 additions & 6 deletions

File tree

Modules/mmapmodule.c

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -752,12 +752,8 @@ new_mmap_object (PyObject * self, PyObject * args)
752752
PyErr_SetFromErrno(mmap_module_error);
753753
return NULL;
754754
}
755-
//
756-
// fh = OpenFile (filename, &file_info, OF_READWRITE);
757-
// if (fh == HFILE_ERROR) {
758-
// PyErr_SetFromWindowsErr(GetLastError());
759-
// return NULL;
760-
// }
755+
/* Win9x appears to need us seeked to zero */
756+
fseek(&_iob[fileno], 0, SEEK_SET);
761757
}
762758

763759
m_obj = PyObject_NEW (mmap_object, &mmap_object_type);

0 commit comments

Comments
 (0)