summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1997-01-24 03:44:17 (GMT)
committerGuido van Rossum <guido@python.org>1997-01-24 03:44:17 (GMT)
commitd031c898914c430d42eee76d854579c1857d7e1c (patch)
tree05b4667d61571fc598c76437d9112c3994f7d00f
parentda4eb5c3b55df9b7d6957ddd0458313102f0a92e (diff)
downloadcpython-d031c898914c430d42eee76d854579c1857d7e1c.zip
cpython-d031c898914c430d42eee76d854579c1857d7e1c.tar.gz
cpython-d031c898914c430d42eee76d854579c1857d7e1c.tar.bz2
Marshal the line number table of code objects.
-rw-r--r--Python/marshal.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/Python/marshal.c b/Python/marshal.c
index 6638c9d..cd898b2 100644
--- a/Python/marshal.c
+++ b/Python/marshal.c
@@ -252,6 +252,8 @@ w_object(v, p)
w_object(co->co_varnames, p);
w_object(co->co_filename, p);
w_object(co->co_name, p);
+ w_short(co->co_firstlineno, p);
+ w_object(co->co_lnotab, p);
}
else {
w_byte(TYPE_UNKNOWN, p);
@@ -520,6 +522,8 @@ r_object(p)
object *varnames = NULL;
object *filename = NULL;
object *name = NULL;
+ int firstlineno;
+ object *lnotab = NULL;
code = r_object(p);
if (code) consts = r_object(p);
@@ -527,12 +531,16 @@ r_object(p)
if (names) varnames = r_object(p);
if (varnames) filename = r_object(p);
if (filename) name = r_object(p);
+ if (name) {
+ firstlineno = r_short(p);
+ lnotab = r_object(p);
+ }
if (!err_occurred()) {
v = (object *) newcodeobject(
argcount, nlocals, stacksize, flags,
code, consts, names, varnames,
- filename, name);
+ filename, name, firstlineno, lnotab);
}
else
v = NULL;