summaryrefslogtreecommitdiffstats
path: root/Modules/mmapmodule.c
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* Improve extended slicing support in builtin types and classes. Specifically:Thomas Wouters2007-08-281-1/+151
| | | | | | | | | | | | | | | | | | | | - Specialcase extended slices that amount to a shallow copy the same way as is done for simple slices, in the tuple, string and unicode case. - Specialcase step-1 extended slices to optimize the common case for all involved types. - For lists, allow extended slice assignment of differing lengths as long as the step is 1. (Previously, 'l[:2:1] = []' failed even though 'l[:2] = []' and 'l[:2:None] = []' do not.) - Implement extended slicing for buffer, array, structseq, mmap and UserString.UserString. - Implement slice-object support (but not non-step-1 slice assignment) for UserString.MutableString. - Add tests for all new functionality.
* PEP 3123: Provide forward compatibility with Python 3.0, while keepingMartin v. Löwis2007-07-211-3/+2
| | | | | backwards compatibility. Add Py_Refcnt, Py_Type, Py_Size, and PyVarObject_HEAD_INIT.
* Alexander Belopolsky pointed out that pos is a size_tNeal Norwitz2006-08-221-1/+1
|
* Fix a couple of ssize-t issues reported by Alexander Belopolsky on python-devNeal Norwitz2006-08-211-1/+1
|
* Get rid of compiler warningNeal Norwitz2006-08-131-2/+2
|
* Check return result of PyModule_GetDict().Neal Norwitz2006-08-131-22/+24
| | | | | Fix a bunch of refleaks in the init of the module. This would only be found when running python -v.
* Patch #1538606, Patch to fix __index__() clipping.Neal Norwitz2006-08-121-22/+8
| | | | | | | I modified this patch some by fixing style, some error checking, and adding XXX comments. This patch requires review and some changes are to be expected. I'm checking in now to get the greatest possible review and establish a baseline for moving forward. I don't want this to hold up release if possible.
* Patch #1495999: Part two of Windows CE changes.Martin v. Löwis2006-06-101-0/+3
| | | | | | - update header checks, using autoconf - provide dummies for getenv, environ, and GetVersion - adjust MSC_VER check in socketmodule.c
* Make use of METH_O and METH_NOARGS where possible.Georg Brandl2006-05-291-20/+10
| | | | Use Py_UnpackTuple instead of PyArg_ParseTuple where possible.
* Correct some value converting strangenesses.Georg Brandl2006-05-291-3/+3
|
* Checking in the code for PEP 357.Guido van Rossum2006-03-071-17/+8
| | | | | | This was mostly written by Travis Oliphant. I've inspected it all; Neal Norwitz and MvL have also looked at it (in an earlier incarnation).
* More unconsting.Martin v. Löwis2006-02-271-2/+2
|
* Fix typo.Martin v. Löwis2006-02-181-1/+1
|
* Fix size computation on Win64.Martin v. Löwis2006-02-181-12/+46
|
* Fix typo.Thomas Wouters2006-02-171-1/+1
|
* Remove size restrictions.Martin v. Löwis2006-02-171-29/+19
|
* mmap_flush_method(): Squash compiler warning aboutTim Peters2006-02-171-2/+2
| | | | mixing signed and unsigned types in comparison.
* Remove space between function name and left parenTim Peters2006-02-171-94/+92
| | | | in function calls.
* Removed pointless parens around `return` expressions;Tim Peters2006-02-161-22/+20
| | | | deleted some curlies around one-line blocks.