summaryrefslogtreecommitdiffstats
path: root/Python/marshal.c
Commit message (Collapse)AuthorAgeFilesLines
* Recorded merge of revisions 81029 via svnmerge fromAntoine Pitrou2010-05-091-1030/+1030
| | | | | | | | | | 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. ........
* Issue #7019: An attempt to unmarshal bad long data could produceMark Dickinson2009-10-031-1/+2
| | | | unnormalized PyLong objects; make it raise ValueError instead.
* Merged revisions 72601 via svnmerge fromR. David Murray2009-05-131-1/+1
| | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r72601 | r.david.murray | 2009-05-13 09:07:14 -0400 (Wed, 13 May 2009) | 3 lines Move news item to correct section, remove spurious 'see below' from docstring. ........
* Merged revisions 72597 via svnmerge fromR. David Murray2009-05-131-5/+81
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r72597 | r.david.murray | 2009-05-12 20:30:29 -0400 (Tue, 12 May 2009) | 2 lines Issue 5994: add docstrings to marshal. ........
* Issue 3116: fix quadratic behavior in marshal.dumps().Raymond Hettinger2008-06-161-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
|
* #1792: Improve performance of marshal.dumps() on large objects by increasingAndrew M. Kuchling2008-05-111-1/+4
| | | | the size of the buffer more quickly.
* Fix refleakNeal Norwitz2008-02-011-0/+1
|
* Removed unused varChristian Heimes2008-01-301-1/+1
|
* Removed unnecessary conditional (spotted by Neal Norwitz).Raymond Hettinger2008-01-281-1/+1
|
* Let marshal built-up sets and frozensets one element at a time (without ↵Raymond Hettinger2008-01-281-12/+8
| | | | creating an intermediate tuple).
* Revert PySet_Add() changes.Raymond Hettinger2008-01-261-8/+12
|
* Let marshal build-up sets and frozensets one element at a time.Raymond Hettinger2008-01-261-12/+8
| | | | Saves the unnecessary creation of a tuple as intermediate container.
* Fix marshal's incorrect handling of subclasses of builtin types (backport ↵Raymond Hettinger2007-11-071-10/+10
| | | | candidate).
* Fix Coverity 185-186: If the passed in FILE is NULL, uninitialized memoryNeal Norwitz2007-10-121-0/+2
| | | | | | would be accessed. Will backport.
* Last try for tweaking the max stack depth. 5000 was the original value,Neal Norwitz2007-05-171-1/+1
| | | | | 4000 didn't work either. 1000 does work on Windows. If 2000 works, that will hopefully be a reasonable balance.
* Set the depth to something very small to try to determine if theNeal Norwitz2007-05-171-1/+1
| | | | | crashes on Windows are really due to the stack size or possibly some other problem.
* Reduce the max stack depth to see if this fixes the segfaults onNeal Norwitz2007-05-171-1/+1
| | | | | Windows and some other boxes. If this is successful, this rev should be backported. I'm not sure how close to the limit we should push this.
* Fix bug in marshal where bad data would cause a segfault due toNeal Norwitz2007-05-161-69/+156
| | | | | | lack of an infinite recursion check. Contributed by Damien Miller at Google.
* Forward-port of r52136,52138: a review of overflow-detecting code.Armin Rigo2006-10-041-13/+25
| | | | | | | | | | | | | | | | | | | | | | | * unified the way intobject, longobject and mystrtoul handle values around -sys.maxint-1. * in general, trying to entierely avoid overflows in any computation involving signed ints or longs is extremely involved. Fixed a few simple cases where a compiler might be too clever (but that's all guesswork). * more overflow checks against bad data in marshal.c. * 2.5 specific: fixed a number of places that were still confusing int and Py_ssize_t. Some of them could potentially have caused "real-world" breakage. * list.pop(x): fixing overflow issues on x was messy. I just reverted to PyArg_ParseTuple("n"), which does the right thing. (An obscure test was trying to give a Decimal to list.pop()... doesn't make sense any more IMHO) * trying to write a few tests...
* This code is actually not used unless WITHOUT_COMPLEX is defined.Neal Norwitz2006-08-121-0/+8
| | | | | | | | However, there was no error checking that PyFloat_FromDouble returned a valid pointer. I believe this change is correct as it seemed to follow other code in the area. Klocwork # 292.
* Convert more modules to METH_VARARGS.Georg Brandl2006-05-291-5/+3
|
* Change int to Py_ssize_t in several places.Martin v. Löwis2006-03-071-10/+26
| | | | | Add (int) casts to silence compiler warnings. Raise Python exceptions for overflows.
* Make Py_ssize_t clean.Thomas Wouters2006-03-011-1/+3
|
* Fix incompatible assignment warning from previous checkin.Thomas Wouters2006-03-011-1/+2
|
* Fix gcc (4.0.x) warning about use of uninitialized variables.Thomas Wouters2006-03-011-1/+2
| | | | | (PyMarshal_ReadShortFromFile() is only used in zipimport.c, I don't believe the extra initializations will matter one way or another.)
* Move cast to suppress warning.Martin v. Löwis2006-02-161-2/+2
|
* Merge ssize_t branch.Martin v. Löwis2006-02-151-11/+15
|
* Check return result from Py_InitModule*(). This API can fail.Neal Norwitz2006-01-191-0/+2
| | | | Probably should be backported.
* version was not initialized properlyNeal Norwitz2005-11-161-0/+1
|
* Fix a bunch of imports to use code.h instead of compile.h.Jeremy Hylton2005-10-211-1/+0
| | | | Remove duplicate declarations from compile.h
* Merge ast-branch to headJeremy Hylton2005-10-201-0/+1
| | | | | | | | | | This change implements a new bytecode compiler, based on a transformation of the parse tree to an abstract syntax defined in Parser/Python.asdl. The compiler implementation is not complete, but it is in stable enough shape to run the entire test suite excepting two disabled tests.
* Add a C API for sets and frozensets.Raymond Hettinger2005-08-161-4/+2
|
* Fix signedness of various char variables to stop causing a warning under gcc 4.Brett Cannon2005-06-251-10/+10
|
* Fix bugMichael W. Hudson2005-06-131-0/+4
| | | | | | | | [ 1180997 ] lax error-checking in new-in-2.4 marshal stuff which I'd assigned to Martin, but actually turned out to be easy to fix. Also, a test.
* Remove extraneous format character from PyArg_ParseTuple call inMichael W. Hudson2005-06-131-1/+1
| | | | | | marshal_loads. Bugfix candidate.
* Fix a couple of crashing-on-malformed data marshal bugs.Michael W. Hudson2005-06-031-6/+8
|
* This is my patch:Michael W. Hudson2005-06-031-65/+175
| | | | | | | | | [ 1180995 ] binary formats for marshalling floats Adds 2 new type codes for marshal (binary floats and binary complexes), a new marshal version (2), updates MAGIC and fiddles the de-serializing of code objects to be less likely to clobber the real reason for failing if it fails.
* remove unused variableFred Drake2005-01-121-1/+0
|
* SF 1098985: set objects cannot be marshalledRaymond Hettinger2005-01-111-1/+66
|
* Any call to marshal.dumps() with the new optional argument 'version' justArmin Rigo2004-12-201-1/+1
| | | | | immediately segfaults, due to a typo! This was obviously never tested... Added a test for it, and also fixed the documentation.
* Patch #923098: Share interned strings in marshal.Martin v. Löwis2004-06-271-15/+74
|
* Make private function staticNeal Norwitz2004-06-131-1/+1
|
* Patch #774665: Make Python LC_NUMERIC agnostic.Martin v. Löwis2004-06-081-3/+3
|
* Marshal clean-up (SF patch #873224)Armin Rigo2004-03-261-63/+54
|
* Bug #794140: cygwin builds do not embedJason Tishler2003-09-041-1/+1
| | | | | | The embed2.diff patch solves the user's problem by exporting the missing symbols from the Python core so Python can be embedded in another Cygwin application (well, at lest vim).
* Whitespace normalization.Thomas Heller2002-07-301-4/+4
|
* Fix SF 588452: debug build crashes on marshal.dumps([128] * 1000).Thomas Heller2002-07-301-6/+6
| | | | | | | | | See there for a description. Added test case. Bugfix candidate for 2.2.x, not sure about previous versions: probably low priority, because virtually no one runs debug builds.
* Fix SF bug # 561858 Assertion with very long listsNeal Norwitz2002-06-141-10/+10
| | | | | Write 4 bytes for co_stacksize, etc. to prevent writing out bad .pyc files which can cause a crash when read back in.