From: Fred Drake Date: Wed, 5 Apr 2000 14:15:31 +0000 (+0000) Subject: Mark Hammond : X-Git-Tag: v1.6a2~134 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1ef4e2d54e5419b7164572db13330ed0b241fd0a;p=python Mark Hammond : This patch fixes the mmap module on Windows 9x. --- diff --git a/Modules/mmapmodule.c b/Modules/mmapmodule.c index a17f55e223..9f814083e2 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);