summaryrefslogtreecommitdiffstats
path: root/Modules/mmapmodule.c
Commit message (Collapse)AuthorAgeFilesLines
* Patch from Lorenzo M. Catucci:Andrew M. Kuchling2000-06-181-0/+5
| | | | | | I discovered the [MREMAP_MAYMOVE] symbol is only defined when _GNU_SOURCE is defined; therefore, here is the change: if we are compiling for linux, define _GNU_SOURCE before including mman.h, and all is done.
* Support resizing the mapping depending on whether HAVE_MREMAP is definedAndrew M. Kuchling2000-06-181-4/+6
| | | | Remove two unused variables
* Patch from Trent Mick:Andrew M. Kuchling2000-06-181-34/+105
| | | | | | | The seek() method is broken for any 'whence' value (seek from start, current, orend) other than the default. I have a patch that fixes that as well as gets mmap'd files working on Linux64 and Win64.
* Removed MS_INVALIDATE flagsAndrew M. Kuchling2000-06-181-2/+2
|
* Fix the size() method to return the size of the file on Unix, not theAndrew M. Kuchling2000-06-171-3/+12
| | | | | size of the mapped area. This seems to be what the Windows version does. This change requires keeping around the fd of the mapped file.
* Use PyArg_ParseTuple and specify the method names, following a suggestionAndrew M. Kuchling2000-06-031-5/+5
| | | | from Greg Stein
* Add missing PyArg_NoArgs() calls to methods that didn't take argumentsAndrew M. Kuchling2000-06-031-8/+16
| | | | (Pointed out by Moshe Zadka)
* Vladimir Marangozov's long-awaited malloc restructuring.Guido van Rossum2000-05-031-3/+3
| | | | | | | | | | For more comments, read the patches@python.org archives. For documentation read the comments in mymalloc.h and objimpl.h. (This is not exactly what Vladimir posted to the patches list; I've made a few changes, and Vladimir sent me a fix in private email for a problem that only occurs in debug mode. I'm also holding back on his change to main.c, which seems unnecessary to me.)
* Correct fix by Mark Favas for the cast problems.Guido van Rossum2000-04-101-4/+5
|
* I've had complaints about the comparison "where >= 0" before -- onGuido van Rossum2000-04-101-1/+1
| | | | IRIX, it doesn't even compile. Added a cast: "where >= (char *)0".
* Mark Hammond <mhammond@skippinet.com.au>:Fred Drake2000-04-051-6/+2
| | | | This patch fixes the mmap module on Windows 9x.
* Patch from Hrvoje Niksic <hniksic@iskon.hr>:Fred Drake2000-04-041-8/+8
| | | | | | | | | | | | | | The bug is in mmap_read_line_method(), and its loop that searches for newlines. After the loop reaches EOF, eol is incremented and points after the end of the memory. This results in readline() method sometimes picking up and returning a byte after the end of the string. This is usually a bogus \0, but it could cause SIGSEGV if it's after the end of the page). The patch fixes the problem. Also, it uses memchr() for finding a character, which is in fact the "strnchr" the comment is asking for. memchr() is already used in Python sources, so there should be no portability problems.
* Removed three unused variables from the Windows code.Guido van Rossum2000-03-311-3/+0
|
* Hacked for Win32 by Mark Hammond.Guido van Rossum2000-03-311-542/+569
| | | | | | | | | | | | | | | | | Reformatted for 8-space tabs and fitted into 80-char lines by GvR. Mark writes: * the Win32 version now accepts the same args as the Unix version. The win32 specific "tag" param is now optional. The end result is that the exact same test suite runs on Windows (definately a worthy goal!). * I changed the error object. All occurences of the error, except for 1, corresponds to an underlying OS error. This one was changed to a ValueError (a better error for that condition), and the module error object is now simply EnvironmentError. All win32 error routines now call the new Windows specific error handler.
* Added mmap module -- map a view of a file into memory on Win32 and Unix.Andrew M. Kuchling2000-03-301-0/+848
(Needs testing on Win32.)