From d031c898914c430d42eee76d854579c1857d7e1c Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Fri, 24 Jan 1997 03:44:17 +0000 Subject: Marshal the line number table of code objects. --- Python/marshal.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) 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; -- cgit v0.12