summaryrefslogtreecommitdiffstats
path: root/Modules/mmapmodule.c
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2000-04-05 14:15:31 (GMT)
committerFred Drake <fdrake@acm.org>2000-04-05 14:15:31 (GMT)
commit1ef4e2d54e5419b7164572db13330ed0b241fd0a (patch)
tree3b78d61d1084518f68bf32d4f89c6a8b106e08dd /Modules/mmapmodule.c
parentaaa8bb42116b8ef68eeb2d112347b353c2d37863 (diff)
downloadcpython-1ef4e2d54e5419b7164572db13330ed0b241fd0a.zip
cpython-1ef4e2d54e5419b7164572db13330ed0b241fd0a.tar.gz
cpython-1ef4e2d54e5419b7164572db13330ed0b241fd0a.tar.bz2
Mark Hammond <mhammond@skippinet.com.au>:
This patch fixes the mmap module on Windows 9x.
Diffstat (limited to 'Modules/mmapmodule.c')
-rw-r--r--Modules/mmapmodule.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/Modules/mmapmodule.c b/Modules/mmapmodule.c
index a17f55e..9f81408 100644
--- a/Modules/mmapmodule.c
+++ b/Modules/mmapmodule.c
@@ -752,12 +752,8 @@ new_mmap_object (PyObject * self, PyObject * args)
PyErr_SetFromErrno(mmap_module_error);
return NULL;
}
-//
-// fh = OpenFile (filename, &file_info, OF_READWRITE);
-// if (fh == HFILE_ERROR) {
-// PyErr_SetFromWindowsErr(GetLastError());
-// return NULL;
-// }
+ /* Win9x appears to need us seeked to zero */
+ fseek(&_iob[fileno], 0, SEEK_SET);
}
m_obj = PyObject_NEW (mmap_object, &mmap_object_type);