Commit Graph

91 Commits

Author SHA1 Message Date
Neal Norwitz
ef78529e86 version was not initialized properly 2005-11-16 05:04:51 +00:00
Jeremy Hylton
ec97a28b60 Fix a bunch of imports to use code.h instead of compile.h.
Remove duplicate declarations from compile.h
2005-10-21 14:58:06 +00:00
Jeremy Hylton
3e0055f8c6 Merge ast-branch to head
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.
2005-10-20 19:59:25 +00:00
Raymond Hettinger
beb3101b05 Add a C API for sets and frozensets. 2005-08-16 03:47:52 +00:00
Brett Cannon
c9371d4a1b Fix signedness of various char variables to stop causing a warning under gcc 4. 2005-06-25 08:23:41 +00:00
Michael W. Hudson
f2ca5af439 Fix bug
[ 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.
2005-06-13 18:28:46 +00:00
Michael W. Hudson
01fca11080 Remove extraneous format character from PyArg_ParseTuple call in
marshal_loads.

Bugfix candidate.
2005-06-13 17:50:18 +00:00
Michael W. Hudson
6d6917be00 Fix a couple of crashing-on-malformed data marshal bugs. 2005-06-03 15:17:16 +00:00
Michael W. Hudson
df88846ebc This is my patch:
[ 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.
2005-06-03 14:41:55 +00:00
Fred Drake
d7c27bef52 remove unused variable 2005-01-12 16:00:55 +00:00
Raymond Hettinger
a422c34b70 SF 1098985: set objects cannot be marshalled 2005-01-11 03:03:27 +00:00
Armin Rigo
2ccea17856 Any call to marshal.dumps() with the new optional argument 'version' just
immediately segfaults, due to a typo!  This was obviously never tested...
Added a test for it, and also fixed the documentation.
2004-12-20 12:25:57 +00:00
Martin v. Löwis
ef82d2fdfe Patch #923098: Share interned strings in marshal. 2004-06-27 16:51:46 +00:00
Neal Norwitz
d85c452604 Make private function static 2004-06-13 20:31:49 +00:00
Martin v. Löwis
737ea82a5a Patch #774665: Make Python LC_NUMERIC agnostic. 2004-06-08 18:52:54 +00:00
Armin Rigo
01ab279056 Marshal clean-up (SF patch #873224) 2004-03-26 15:09:27 +00:00
Jason Tishler
6bc06eca70 Bug #794140: cygwin builds do not embed
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).
2003-09-04 11:59:50 +00:00
Thomas Heller
37d5a15e02 Whitespace normalization. 2002-07-30 11:44:44 +00:00
Thomas Heller
3e1c18ad0c Fix SF 588452: debug build crashes on marshal.dumps([128] * 1000).
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.
2002-07-30 11:40:57 +00:00
Neal Norwitz
7fdcb41131 Fix SF bug # 561858 Assertion with very long lists
Write 4 bytes for co_stacksize, etc. to prevent writing out
bad .pyc files which can cause a crash when read back in.
2002-06-14 01:07:39 +00:00
Guido van Rossum
77f6a65eb0 Add the 'bool' type and its values 'False' and 'True', as described in
PEP 285.  Everything described in the PEP is here, and there is even
some documentation.  I had to fix 12 unit tests; all but one of these
were printing Boolean outcomes that changed from 0/1 to False/True.
(The exception is test_unicode.py, which did a type(x) == type(y)
style comparison.  I could've fixed that with a single line using
issubtype(x, type(y)), but instead chose to be explicit about those
places where a bool is expected.

Still to do: perhaps more documentation; change standard library
modules to return False/True from predicates.
2002-04-03 22:41:51 +00:00
Neal Norwitz
031829d3ef Use symbolic METH_VARARGS instead of 1 for ml_flags 2002-03-31 14:37:44 +00:00
Jeremy Hylton
9f64caaf00 Use PyObject_CheckReadBuffer(). 2001-11-09 22:02:48 +00:00
Guido van Rossum
b8cf3e64be SF patch #470393 (Jim Ahlstrom): Add missing marshal function
In Include/, marshal.h declares both
    PyMarshal_ReadLongFromFile()
    and PyMarshal_ReadShortFromFile(),
    but the second is missing from marshal.c.

[Shouldn't the return type be declared as 'short' instead of 'int'?
But 'int' is what was in marshal.h all those years...  --Guido]
2001-10-19 01:46:21 +00:00
Michael W. Hudson
8019913e4a fix for part of bug #453523: disable unmarshalling of code objects in
restricted execution mode.
2001-08-30 14:50:20 +00:00