diff options
author | Mark Shannon <mark@hotpy.org> | 2021-04-29 12:12:51 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-04-29 12:12:51 (GMT) |
commit | c76da79b37d2bcbe575cc927ba0a9b7a9ce465db (patch) | |
tree | cf5e884131b3f44f038355ff4980cfbb97a6e228 /Python/compile.c | |
parent | 53dd6c99b39d90935c00bc1558582e494641248e (diff) | |
download | cpython-c76da79b37d2bcbe575cc927ba0a9b7a9ce465db.zip cpython-c76da79b37d2bcbe575cc927ba0a9b7a9ce465db.tar.gz cpython-c76da79b37d2bcbe575cc927ba0a9b7a9ce465db.tar.bz2 |
bpo-42739: Don't use sentinels to mark end of line table. (GH-25657)
* Add length parameter to PyLineTable_InitAddressRange and doen't use sentinel values at end of table. Makes the line number table more robust.
* Update PyCodeAddressRange to match PEP 626.
Diffstat (limited to 'Python/compile.c')
-rw-r--r-- | Python/compile.c | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/Python/compile.c b/Python/compile.c index 3cf6122..1349a85 100644 --- a/Python/compile.c +++ b/Python/compile.c @@ -6959,10 +6959,6 @@ assemble(struct compiler *c, int addNone) if (!assemble_line_range(&a)) { return 0; } - /* Emit sentinel at end of line number table */ - if (!assemble_emit_linetable_pair(&a, 255, -128)) { - goto error; - } if (_PyBytes_Resize(&a.a_lnotab, a.a_lnotab_off) < 0) { goto error; |