summaryrefslogtreecommitdiffstats
path: root/Python/marshal.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1996-07-30 16:49:37 (GMT)
committerGuido van Rossum <guido@python.org>1996-07-30 16:49:37 (GMT)
commit8861b74445560c078d11ff6800a3ce20a869ea93 (patch)
tree67426f7e9173e2c4a0f0040f1f97ed7c3270dbc2 /Python/marshal.c
parent3ecebf17324b138a9d10ad429c0ad55ab5de1682 (diff)
downloadcpython-8861b74445560c078d11ff6800a3ce20a869ea93.zip
cpython-8861b74445560c078d11ff6800a3ce20a869ea93.tar.gz
cpython-8861b74445560c078d11ff6800a3ce20a869ea93.tar.bz2
Changes for slice and ellipses
Diffstat (limited to 'Python/marshal.c')
-rw-r--r--Python/marshal.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/Python/marshal.c b/Python/marshal.c
index 509e303..4a2701a 100644
--- a/Python/marshal.c
+++ b/Python/marshal.c
@@ -37,6 +37,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define TYPE_NULL '0'
#define TYPE_NONE 'N'
+#define TYPE_ELLIPSES '.'
#define TYPE_INT 'i'
#define TYPE_FLOAT 'f'
#define TYPE_COMPLEX 'x'
@@ -129,6 +130,8 @@ w_object(v, p)
w_byte(TYPE_NULL, p);
else if (v == None)
w_byte(TYPE_NONE, p);
+ else if (v == Py_Ellipses)
+ w_byte(TYPE_ELLIPSES, p);
else if (is_intobject(v)) {
w_byte(TYPE_INT, p);
w_long(getintvalue(v), p);
@@ -322,6 +325,10 @@ r_object(p)
INCREF(None);
return None;
+ case TYPE_ELLIPSES:
+ INCREF(Py_Ellipses);
+ return Py_Ellipses;
+
case TYPE_INT:
return newintobject(r_long(p));