diff options
author | Tim Peters <tim.peters@gmail.com> | 2001-06-18 22:08:13 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2001-06-18 22:08:13 (GMT) |
commit | 5ca576ed0a0c697c7e7547adfd0b3af010fd2053 (patch) | |
tree | 0b0db361191363b3c168a6c105030f53e181d3e5 /Python/marshal.c | |
parent | 1dad6a86de55c38da5c356c2c6d81be8ff7884b1 (diff) | |
download | cpython-5ca576ed0a0c697c7e7547adfd0b3af010fd2053.zip cpython-5ca576ed0a0c697c7e7547adfd0b3af010fd2053.tar.gz cpython-5ca576ed0a0c697c7e7547adfd0b3af010fd2053.tar.bz2 |
Merging the gen-branch into the main line, at Guido's direction. Yay!
Bugfix candidate in inspect.py: it was referencing "self" outside of
a method.
Diffstat (limited to 'Python/marshal.c')
-rw-r--r-- | Python/marshal.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Python/marshal.c b/Python/marshal.c index 7cd84f6..008659d 100644 --- a/Python/marshal.c +++ b/Python/marshal.c @@ -17,6 +17,7 @@ #define TYPE_NULL '0' #define TYPE_NONE 'N' +#define TYPE_STOPITER 'S' #define TYPE_ELLIPSIS '.' #define TYPE_INT 'i' #define TYPE_INT64 'I' @@ -120,6 +121,9 @@ w_object(PyObject *v, WFILE *p) else if (v == Py_None) { w_byte(TYPE_NONE, p); } + else if (v == PyExc_StopIteration) { + w_byte(TYPE_STOPITER, p); + } else if (v == Py_Ellipsis) { w_byte(TYPE_ELLIPSIS, p); } @@ -376,6 +380,10 @@ r_object(RFILE *p) Py_INCREF(Py_None); return Py_None; + case TYPE_STOPITER: + Py_INCREF(PyExc_StopIteration); + return PyExc_StopIteration; + case TYPE_ELLIPSIS: Py_INCREF(Py_Ellipsis); return Py_Ellipsis; |