diff options
author | Mark Shannon <mark@hotpy.org> | 2022-04-21 16:10:37 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-21 16:10:37 +0100 |
commit | 944fffee8916cb94321fa33cd3a43f4108717746 (patch) | |
tree | f88202dd13021ad5cf4b260ecf05ebab6015a5f6 /Python/marshal.c | |
parent | 2a5f171759a31597032cfe52646929e6f8727243 (diff) | |
download | cpython-git-944fffee8916cb94321fa33cd3a43f4108717746.tar.gz |
GH-88116: Use a compact format to represent end line and column offsets. (GH-91666)
* Stores all location info in linetable to conform to PEP 626.
* Remove column table from code objects.
* Remove end-line table from code objects.
* Document new location table format
Diffstat (limited to 'Python/marshal.c')
-rw-r--r-- | Python/marshal.c | 16 |
1 files changed, 1 insertions, 15 deletions
diff --git a/Python/marshal.c b/Python/marshal.c index 19abcc8ffe..bbe67e3379 100644 --- a/Python/marshal.c +++ b/Python/marshal.c @@ -564,8 +564,6 @@ w_complex_object(PyObject *v, char flag, WFILE *p) w_object(co->co_qualname, p); w_long(co->co_firstlineno, p); w_object(co->co_linetable, p); - w_object(co->co_endlinetable, p); - w_object(co->co_columntable, p); w_object(co->co_exceptiontable, p); Py_DECREF(co_code); } @@ -1357,9 +1355,7 @@ r_object(RFILE *p) PyObject *name = NULL; PyObject *qualname = NULL; int firstlineno; - PyObject *linetable = NULL; - PyObject* endlinetable = NULL; - PyObject* columntable = NULL; + PyObject* linetable = NULL; PyObject *exceptiontable = NULL; idx = r_ref_reserve(flag, p); @@ -1415,12 +1411,6 @@ r_object(RFILE *p) linetable = r_object(p); if (linetable == NULL) goto code_error; - endlinetable = r_object(p); - if (endlinetable == NULL) - goto code_error; - columntable = r_object(p); - if (columntable == NULL) - goto code_error; exceptiontable = r_object(p); if (exceptiontable == NULL) goto code_error; @@ -1434,8 +1424,6 @@ r_object(RFILE *p) .code = code, .firstlineno = firstlineno, .linetable = linetable, - .endlinetable = endlinetable, - .columntable = columntable, .consts = consts, .names = names, @@ -1473,8 +1461,6 @@ r_object(RFILE *p) Py_XDECREF(name); Py_XDECREF(qualname); Py_XDECREF(linetable); - Py_XDECREF(endlinetable); - Py_XDECREF(columntable); Py_XDECREF(exceptiontable); } retval = v; |