mirror of
https://github.com/python/cpython.git
synced 2025-08-24 02:35:59 +00:00
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.
This commit is contained in:
parent
53dd6c99b3
commit
c76da79b37
13 changed files with 4968 additions and 4986 deletions
|
@ -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;
|
||||
|
|
|
@ -8,5 +8,5 @@ const unsigned char _Py_M__hello[] = {
|
|||
5,112,114,105,110,116,169,0,114,1,0,0,0,114,1,0,
|
||||
0,0,122,14,60,102,114,111,122,101,110,32,104,101,108,108,
|
||||
111,62,218,8,60,109,111,100,117,108,101,62,1,0,0,0,
|
||||
115,6,0,0,0,4,0,12,1,255,128,
|
||||
115,4,0,0,0,4,0,12,1,
|
||||
};
|
||||
|
|
3203
Python/importlib.h
generated
3203
Python/importlib.h
generated
File diff suppressed because it is too large
Load diff
4800
Python/importlib_external.h
generated
4800
Python/importlib_external.h
generated
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue