From c76da79b37d2bcbe575cc927ba0a9b7a9ce465db Mon Sep 17 00:00:00 2001 From: Mark Shannon Date: Thu, 29 Apr 2021 13:12:51 +0100 Subject: 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. --- Python/compile.c | 4 ---- 1 file changed, 4 deletions(-) (limited to 'Python/compile.c') diff --git a/Python/compile.c b/Python/compile.c index 3cf6122196..1349a852a2 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; -- cgit v1.2.1