summaryrefslogtreecommitdiffstats
path: root/Modules/mmapmodule.c
Commit message (Collapse)AuthorAgeFilesLines
* bpo-30074: Fix compile warnings of _PySlice_Unpack and convert missed (#1154)Serhiy Storchaka2017-04-151-2/+2
| | | | PySlice_GetIndicesEx in _ctypes.c.
* bpo-27867: Expand the PySlice_GetIndicesEx macro. (#1023) (#1046)Serhiy Storchaka2017-04-081-5/+4
| | | | (cherry picked from commit b879fe8)
* make 'where' Py_ssize_tBenjamin Peterson2016-10-061-4/+2
|
* mmap: do all internal arithmetic with Py_ssize_t while being very careful ↵Benjamin Peterson2016-10-061-106/+78
| | | | about overflow
* Issue #25421: __sizeof__ methods of builtin types now use dynamic basic size.Serhiy Storchaka2015-12-191-1/+1
| | | | | This allows sys.getsize() to work correctly with their subclasses with __slots__ defined.
* include fcntl.h on all *nix platforms (closes #24217)Benjamin Peterson2015-08-021-2/+2
| | | | Patch by Jeffrey Armstrong.
* Issue #15696: Add a __sizeof__ implementation for mmap objects on Windows.Serhiy Storchaka2014-08-191-0/+16
|
* Issue #16743: Fix mmap overflow check on 32 bit WindowsRichard Oudkerk2013-02-131-11/+11
|
* #15676: mmap: add empty file check prior to offset check <- Previous patch ↵Jesus Cea2012-09-101-0/+1
| | | | was incomplete (fix 2)
* #15676: mmap: add empty file check prior to offset check <- Previous patch ↵Jesus Cea2012-09-101-0/+5
| | | | was incomplete
* Closes #15676: mmap: add empty file check prior to offset checkJesus Cea2012-09-091-0/+5
|
* Issue 12404: Remove C89 incompatible code from mmap module.Ross Lagerwall2011-06-251-1/+2
| | | | Patch by Akira Kitada.
* (Merge 3.1) Issue #11277: mmap.mmap() calls fcntl(fd, F_FULLFSYNC) on Mac OS XVictor Stinner2011-05-031-0/+9
| | | | | to get around a mmap bug with sparse files. Patch written by Steffen Daode Nurpmeso.
* Issue #11391: Writing to a mmap object created withAntoine Pitrou2011-03-061-5/+10
| | | | | `mmap.PROT_READ|mmap.PROT_EXEC` would segfault instead of raising a TypeError. Patch by Charles-François Natali.
* Merged revisions 88486 via svnmerge fromAntoine Pitrou2011-02-211-48/+59
| | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r88486 | antoine.pitrou | 2011-02-22 00:41:12 +0100 (mar., 22 févr. 2011) | 5 lines Issue #4681: Allow mmap() to work on file sizes and offsets larger than 4GB, even on 32-bit builds. Initial patch by Ross Lagerwall, adapted for 32-bit Windows. ........
* Merged revisions 88131 via svnmerge fromAntoine Pitrou2011-01-201-0/+11
| | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r88131 | antoine.pitrou | 2011-01-20 22:07:24 +0100 (jeu., 20 janv. 2011) | 6 lines Issue #10955: Fix a potential crash when trying to mmap() a file past its length. Initial patch by Ross Lagerwall. This fixes a regression introduced by r88022. ........
* Merged revisions 88036 via svnmerge fromAntoine Pitrou2011-01-151-0/+1
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r88036 | antoine.pitrou | 2011-01-15 18:25:58 +0100 (sam., 15 janv. 2011) | 3 lines Fix mmap and test_mmap under Windows too (followup to r88022) ........
* Merged revisions 88022 via svnmerge fromAntoine Pitrou2011-01-151-1/+1
| | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r88022 | antoine.pitrou | 2011-01-15 17:17:07 +0100 (sam., 15 janv. 2011) | 7 lines Issue #10916: mmap should not segfault when a file is mapped using 0 as length and a non-zero offset, and an attempt to read past the end of file is made (IndexError is raised instead). Patch by Ross Lagerwall. Requested by Georg. ........
* Merged revisions 85678 via svnmerge fromR. David Murray2010-12-111-1/+6
| | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r85678 | r.david.murray | 2010-10-17 21:14:06 -0400 (Sun, 17 Oct 2010) | 5 lines #678250: Make mmap flush a noop on ACCESS_READ and ACCESS_COPY. Patch by Sébastien Sablé. This solves a test_mmap failure on AIX. ........
* Merged revisions 83407 via svnmerge fromBrian Curtin2010-08-011-0/+5
| | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r83407 | brian.curtin | 2010-08-01 10:26:26 -0500 (Sun, 01 Aug 2010) | 3 lines Fix #8105. Add validation to mmap.mmap so invalid file descriptors don't cause a crash on Windows. ........
* Untabify C files. Will watch buildbots.Antoine Pitrou2010-05-091-1056/+1056
|
* Issue #6344: Fixed a crash of mmap.read() when passed a negative argument.Hirokazu Yamamoto2009-06-291-3/+13
| | | | Reviewed by Amaury Forgeot d'Arc.
* Issue #6271: mmap tried to close invalid file handle (-1) when annonymous.Hirokazu Yamamoto2009-06-141-1/+2
| | | | (On Unix) Patch by STINNER Victor.
* bounds check arguments to mmap.move(). All of them. Really.Jack Diederich2009-04-011-9/+9
| | | | fixes crasher on OS X 10.5
* Issue #5387: Fixed mmap.move crash by integer overflow. (take2)Hirokazu Yamamoto2009-03-311-1/+1
|
* Apply patch for netbsd multiprocessing supportJesse Noller2009-03-311-1/+5
|
* Issue #5387: Fixed mmap.move crash by integer overflow.Hirokazu Yamamoto2009-03-311-4/+2
|
* Issue #5385: Fixed mmap crash after resize failure on windows.Hirokazu Yamamoto2009-03-051-6/+13
| | | | | Now uses NULL instead of INVALID_HANDLE_VALUE as invalid map handle because CreateFileMapping returns NULL when error occurs.
* Issue #1733986: Fixed mmap crash in accessing elements of second map objectHirokazu Yamamoto2009-02-281-1/+1
| | | | with same tagname but larger size than first map. (Windows)
* Issue #5386: mmap.write_byte didn't check map size, so it could cause bufferHirokazu Yamamoto2009-02-281-4/+11
| | | | overrun.
* Issue #5282: Fixed mmap resize on 32bit windows and unix. When offset > 0,Hirokazu Yamamoto2009-02-171-2/+2
| | | | The file was resized to wrong size.
* Issue #5292: Fixed mmap crash on its boundary access m[len(m)].Hirokazu Yamamoto2009-02-171-2/+2
|
* Fix strange character in the docstring.Thomas Heller2008-08-191-1/+1
|
* Security patches from Apple: prevent int overflow when allocating memoryNeal Norwitz2008-07-311-1/+1
|
* This reverts r63675 based on the discussion in this thread:Gregory P. Smith2008-06-091-18/+18
| | | | | | | http://mail.python.org/pipermail/python-dev/2008-June/079988.html Python 2.6 should stick with PyString_* in its codebase. The PyBytes_* names in the spirit of 3.0 are available via a #define only. See the email thread.
* Renamed PyString to PyBytesChristian Heimes2008-05-261-18/+18
|
* Issue 2112. mmap does not raises EnvironmentError no more, butFacundo Batista2008-02-171-1/+4
| | | | a subclass of it. Thanks John Lenton.
* Bug #2111: mmap segfaults when trying to write a block opened with PROT_READChristian Heimes2008-02-151-0/+4
| | | | Thanks to Thomas Herve for the fix.
* Use int for the sign rather than a char. char can be signed or unsigned.Neal Norwitz2008-01-271-1/+1
| | | | It's system dependent. This might fix the problem with test_rfind failing.
* Mostly reformat. Also set an error and return NULL if neither MS_WINDOWSNeal Norwitz2008-01-271-15/+13
| | | | nor UNIX is defined. This may have caused problems on cygwin.
* Cleanup the code a bit. test_rfind is failing on PPC and PPC64 buildbots,Neal Norwitz2008-01-261-7/+7
| | | | this might fix the problem.
* Use Py_TYPE() instead of ->ob_typeChristian Heimes2008-01-231-1/+1
|
* Fix for #1087741 patch.Georg Brandl2008-01-221-1/+1
|
* #1087741: make mmap.mmap the type of mmap objects, not aGeorg Brandl2008-01-211-20/+27
| | | | factory function. Allow it to be subclassed.
* Switch mmap from old Py_FindMethod to new PyObject_GenericGetAttr attribute ↵Georg Brandl2008-01-201-10/+36
| | | | | | access. Fixes #1087735.
* Patch #976880: add mmap .rfind() method, and 'end' paramter to .find().Andrew M. Kuchling2008-01-191-5/+34
| | | | Contributed by John Lenton.
* Check for fd of -1 to save fsync() and fstat() callAndrew M. Kuchling2008-01-101-2/+4
|
* #1629: Renamed Py_Size, Py_Type and Py_Refcnt to Py_SIZE, Py_TYPE and ↵Christian Heimes2007-12-191-1/+1
| | | | Py_REFCNT. Macros for b/w compatibility are available.
* Fix some compiler warnings for signed comparisons on Unix and Windows.Neal Norwitz2007-10-311-2/+2
|
* Add phuang patch from Issue 708374 which adds offset parameter to mmap module.Travis E. Oliphant2007-10-231-34/+75
|