summaryrefslogtreecommitdiffstats
path: root/Python/marshal.c
Commit message (Collapse)AuthorAgeFilesLines
* Obscure marshal fixes:Tim Peters2000-09-191-4/+4
| | | | | | | | When reading a short, sign-extend on platforms where shorts are bigger than 16 bits. When reading a long, repair the unportable sign extension that was being done for 64-bit machines (it assumed that signed right shift sign-extends).
* REMOVED all CWI, CNRI and BeOpen copyright markings.Guido van Rossum2000-09-011-9/+0
| | | | This should match the situation in the 1.6b1 tree.
* Included assert.h in Python.h -- it's absurd that this basic tool ofTim Peters2000-07-231-1/+1
| | | | | | | | good C practice hasn't been available to everything all along. Added Py_SAFE_DOWNCAST(VALUE, WIDE, NARROW) macro to pyport.h; this just casts VALUE from type WIDE to type NARROW, but assert-fails if Py_DEBUG is defined and info is lost due to casting. Replaced a line in Fredrik's fix to marshal.c to use the new macro.
* -- changed w_more to take an integer instead of a charFredrik Lundh2000-07-231-2/+2
| | | | (this is what the callers expect).
* Mass ANSIfication of function definitions. Doesn't cover all 'extern'Thomas Wouters2000-07-221-59/+22
| | | | declarations yet, those come later.
* Nuke all remaining occurrences of Py_PROTO and Py_FPROTO.Tim Peters2000-07-091-6/+4
|
* Change copyright notice - 2nd try.Guido van Rossum2000-06-301-6/+0
|
* Change copyright notice.Guido van Rossum2000-06-301-22/+7
|
* Urmpf. Quality control on this patch lapsed a bit. :-(Guido van Rossum2000-06-281-2/+6
| | | | | | | | | | | The depth field was never decremented inside w_object(), and it was never initialized in PyMarshal_WriteObjectToFile(). This caused imports from .pyc files to fil mysteriously when the .pyc file was written by the broken code -- w_object() would bail out early, but PyMarshal_WriteObjectToFile() doesn't check the error or return an error code, and apparently the marshalling code doesn't call PyErr_Check() either. (That's a separate patch if I feel like it.)
* Michael Hudson <mwh21@cam.ac.uk>:Fred Drake2000-06-281-3/+22
| | | | | | | | | | | | | As I really do not have anything better to do at the moment, I have written a patch to Python/marshal.c that prevents Python dumping core when trying to marshal stack bustingly deep (or recursive) data structure. It just throws an exception; even slightly clever handling of recursive data is what pickle is for... [Fred Drake:] Moved magic constant 5000 to a #define. This closes SourceForge patch #100645.
* Vladimir Marangozov's long-awaited malloc restructuring.Guido van Rossum2000-05-031-4/+4
| | | | | | | | | | 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.)
* Use modern PyArg_ParseTuple style, with function names.Guido van Rossum2000-03-311-8/+8
|
* Marc-Andre Lemburg: support marshalling Unicode objects (code 'u').Guido van Rossum2000-03-101-5/+42
|
* The previous checkin contained an experiment of Greg Stein's that wasn'tGuido van Rossum1998-10-081-1/+1
| | | | meant for checkin, and which broke marshal.loads().
* Changes to support other object types besides stringsGuido van Rossum1998-10-071-2/+15
| | | | | as the code string of code objects, as long as they support the (readonly) buffer interface. By Greg Stein.
* When unmarshalling, add test for negative lengths on strings, tuplesGuido van Rossum1998-06-081-2/+14
| | | | | | and lists; if the size is negative, raise an exception. Also raise an exception when an undefined type is found -- all this to increase the chance that garbage input causes an exception instead of a core dump.
* Remove unnecessary PyErr_Clear().Guido van Rossum1998-05-141-1/+0
|
* Make new gcc -Wall happyGuido van Rossum1998-04-101-4/+7
|
* Plugged a leak. (The same as the one plugged in compile.c -- forgotGuido van Rossum1997-07-261-0/+1
| | | | to free lnotab).
* PyFile_WriteString now returns an error indicator instead of callingGuido van Rossum1997-05-221-2/+2
| | | | PyErr_Clear(). Add checking of those errors.
* Quickly renamed the remaining files -- this directory is done.Guido van Rossum1997-04-291-156/+161
|
* New form of PyFPE_END_PROTECT macro.Guido van Rossum1997-03-141-3/+3
|
* Changes for Lee Busby's SIGFPE patch set.Guido van Rossum1997-02-141-1/+9
| | | | | New file pyfpe.c and exception FloatingPointError. Surround some f.p. operations with PyFPE macro brackets.
* Keep gcc -Wall happy.Guido van Rossum1997-02-141-1/+1
|
* Marshal the line number table of code objects.Guido van Rossum1997-01-241-1/+9
|
* Marshal the new stacksize item in code objects.Guido van Rossum1997-01-171-1/+3
|
* Better way to handle 64-bit ints, keeping gcc -Wall happy.Guido van Rossum1996-12-101-30/+18
| | | | Tested with AMK's help.
* Tentative changes to make this work better on 64-bit machines.Guido van Rossum1996-12-051-3/+66
| | | | | A plain int that doesn't fit in 32 bits will be marshalled using a new type. 32 bits machines can't handle this and will issue a warning.
* New permission notice, includes CNRI.Guido van Rossum1996-10-251-13/+20
|
* Ellipses -> Ellipsis rename (the dictionary really says that it shouldGuido van Rossum1996-10-111-6/+6
| | | | | | | | be Ellipsis!). Bumped the API version because a linker-visible symbol is affected. Old C code will still compile -- there's a b/w compat macro. Similarly, old Python code will still run, builtin exports both Ellipses and Ellipsis.
* Added *PyMarshal_WriteObjectToString() (moved the relevant code thereGuido van Rossum1996-08-191-18/+25
| | | | from marshal_loads()).
* Changes for slice and ellipsesGuido van Rossum1996-07-301-0/+7
|
* Py_complex; and WITHOUT_COMPLEX added to getargs.cGuido van Rossum1996-07-211-1/+1
|
* Jeremy's patches for more robust handling of unmarshallable types.Guido van Rossum1996-06-261-5/+22
|
* Plug memory leak (variable names in code objects were being leaked!)Guido van Rossum1996-05-281-0/+1
|
* changes for complex numbersGuido van Rossum1996-01-121-0/+47
|
* Made a bit more robust against out-of-memory situationsJack Jansen1995-10-271-12/+35
|
* rd_object() with exception is fatal errorGuido van Rossum1995-08-281-0/+1
|
* keyword arguments and faster callsGuido van Rossum1995-07-181-3/+13
|
* various tuple related optimizations; remove unused b/w compat code from ceval.cGuido van Rossum1995-03-091-9/+18
|
* hope to fix DEC Alpha gcc problems by declaring ints instead of longsGuido van Rossum1995-02-171-9/+9
|
* Added 1995 to copyright message.Guido van Rossum1995-01-041-2/+2
| | | | | | bltinmodule.c: fixed coerce() nightmare in ternary pow(). modsupport.c (initmodule2): pass METH_FREENAME flag to newmethodobject(). pythonrun.c: move flushline() into and around print_error().
* Lots of changes, most minor (fatal() instead of abort(), use ofGuido van Rossum1995-01-021-0/+8
| | | | | | err_fetch/err_restore and so on). But... NOTE: import.c has been rewritten and all the DL stuff is now in the new file importdl.c.
* Plug memory leak for code objectsGuido van Rossum1994-10-051-0/+1
|
* Merge back to main trunkGuido van Rossum1994-08-301-16/+3
|
* * Makefile: added all: and default: targets.Guido van Rossum1993-07-051-1/+0
| | | | | | | | | | | | * many files: made some functions static; removed "extern int errno;". * frozenmain.c: fixed bugs introduced on 24 June... * flmodule.c: remove 1.5 bw compat hacks, add new functions in 2.2a (and some old functions that were omitted). * timemodule.c: added MSDOS floatsleep version . * pgenmain.c: changed exit() to goaway() and added defn of goaway(). * intrcheck.c: add hack (to UNIX only) so interrupting 3 times will exit from a hanging program. The second interrupt prints a message explaining this to the user.
* Several changes in one:Guido van Rossum1993-05-191-9/+6
| | | | | | | | | | | | | | | | (1) dictionaries/mappings now have attributes values() and items() as well as keys(); at the C level, use the new function mappinggetnext() to iterate over a dictionary. (2) "class C(): ..." is now illegal; you must write "class C: ...". (3) Class objects now know their own name (finally!); and minor improvements to the way how classes, functions and methods are represented as strings. (4) Added an "access" statement and semantics. (This is still experimental -- as long as you don't use the keyword 'access' nothing should be changed.)
* Support for frozen scripts; added -i option.Guido van Rossum1993-04-011-1/+15
|
* * Changed all copyright messages to include 1993.Guido van Rossum1993-03-291-1/+3
| | | | | | | | | | | | | | | | | * Stubs for faster implementation of local variables (not yet finished) * Added function name to code object. Print it for code and function objects. THIS MAKES THE .PYC FILE FORMAT INCOMPATIBLE (the version number has changed accordingly) * Print address of self for built-in methods * New internal functions getattro and setattro (getattr/setattr with string object arg) * Replaced "dictobject" with more powerful "mappingobject" * New per-type functio tp_hash to implement arbitrary object hashing, and hashobject() to interface to it * Added built-in functions hash(v) and hasattr(v, 'name') * classobject: made some functions static that accidentally weren't; added __hash__ special instance method to implement hash() * Added proper comparison for built-in methods and functions
* Added separate main program for the Mac: macmain.cGuido van Rossum1993-01-211-95/+256
| | | | | | | | | | | | | | | | | | | | | stdwinmodule.c: wsetfont can now return an error Makefile: add CL_USE and CL_LIB*S; config.c: move CL part around New things in imgfile; also in Makefile. longobject.c: fix comparison of negative long ints... [REAL BUG!] marshal.c: add dumps() and loads() to read/write strings timemodule.c: make sure there's always a floatsleep() posixmodule.c: rationalize struct returned by times() Makefile: add test target, disable imgfile by default thread.c: Improved coexistance with dl module (sjoerd) stdwinmodule.c: Change include stdwin.h if macintosh rotormodule.c: added missing last argument to RTR_?_region calls confic.c: merged with configmac.c, added 1993 to copyright message fileobject.c: int compared to NULL in writestring(); change fopenRF ifdef timemodule.c: simplify times() using mkvalue; include myselect.h earlier (for sequent). posixmodule: for sequent, include unistd.h instead of explicit extern definitions and don't define rename() Makefile: change misleading/wrong MD5 comments