summaryrefslogtreecommitdiffstats
path: root/Modules/mmapmodule.c
Commit message (Collapse)AuthorAgeFilesLines
* Recorded merge of revisions 81029 via svnmerge fromAntoine Pitrou2010-05-091-1056/+1056
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines Untabify C files. Will watch buildbots. ........
* Merged revisions 73677,73681 via svnmerge fromHirokazu Yamamoto2009-06-291-3/+13
| | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r73677 | hirokazu.yamamoto | 2009-06-29 22:25:16 +0900 | 2 lines Issue #6344: Fixed a crash of mmap.read() when passed a negative argument. Reviewed by Amaury Forgeot d'Arc. ........ r73681 | hirokazu.yamamoto | 2009-06-29 23:29:31 +0900 | 1 line Fixed NEWS. ........
* Merged revisions 73425 via svnmerge fromHirokazu Yamamoto2009-06-141-1/+2
| | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r73425 | hirokazu.yamamoto | 2009-06-14 12:53:55 +0900 | 2 lines Issue #6271: mmap tried to close invalid file handle (-1) when annonymous. (On Unix) Patch by STINNER Victor. ........
* Merged revisions 70879 via svnmerge fromHirokazu Yamamoto2009-03-311-1/+1
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r70879 | hirokazu.yamamoto | 2009-04-01 05:14:04 +0900 | 1 line Issue #5387: Fixed mmap.move crash by integer overflow. (take2) ........
* Merged revisions 70849 via svnmerge fromJesse Noller2009-03-311-1/+5
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r70849 | jesse.noller | 2009-03-31 13:12:35 -0500 (Tue, 31 Mar 2009) | 1 line Apply patch for netbsd multiprocessing support ........
* Merged revisions 70800 via svnmerge fromHirokazu Yamamoto2009-03-311-4/+2
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r70800 | hirokazu.yamamoto | 2009-03-31 22:13:05 +0900 | 1 line Issue #5387: Fixed mmap.move crash by integer overflow. ........
* Merged revisions 70189 via svnmerge fromHirokazu Yamamoto2009-03-051-6/+13
| | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r70189 | hirokazu.yamamoto | 2009-03-05 23:21:12 +0900 | 4 lines Issue #5385: Fixed mmap crash after resize failure on windows. Now uses NULL instead of INVALID_HANDLE_VALUE as invalid map handle because CreateFileMapping returns NULL when error occurs. ........
* Merged revisions 70056 via svnmerge fromHirokazu Yamamoto2009-02-281-1/+1
| | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r70056 | hirokazu.yamamoto | 2009-02-28 21:13:07 +0900 | 2 lines Issue #1733986: Fixed mmap crash in accessing elements of second map object with same tagname but larger size than first map. (Windows) ........
* Merged revisions 70052 via svnmerge fromHirokazu Yamamoto2009-02-281-4/+11
| | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r70052 | hirokazu.yamamoto | 2009-02-28 19:31:54 +0900 | 2 lines Issue #5386: mmap.write_byte didn't check map size, so it could cause buffer overrun. ........
* Merged revisions 69714,69718 via svnmerge fromHirokazu Yamamoto2009-02-181-4/+4
| | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r69714 | hirokazu.yamamoto | 2009-02-17 19:12:10 +0900 | 1 line Issue #5292: Fixed mmap crash on its boundary access m[len(m)]. ........ r69718 | hirokazu.yamamoto | 2009-02-17 22:17:26 +0900 | 3 lines Issue #5282: Fixed mmap resize on 32bit windows and unix. When offset > 0, The file was resized to wrong size. ........
* 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.
* Trimmed trailing whitespace.Tim Peters2006-02-161-41/+41
|
* new_mmap_object(), Windows flavor.Tim Peters2006-02-161-2/+16
| | | | | | | | | | | | | | On a box where sizeof(size_t) == 4, C doesn't define what happens when a size_t value is shifted right by 32 bits, and this caused test_mmap to fail on Windows in a debug build. So use different code to break the size apart depending on how large size_t actually is. This looks like an illusion, since lots of code in this module still appears to assume sizes can't be more than 32 bits (e.g., the internal _GetMapSize() still returns an int), but at least test_mmap passes again.
* More Py_ssize_t format characters.Thomas Wouters2006-02-161-1/+1
|