diff options
author | Mark Shannon <mark@hotpy.org> | 2021-01-05 12:04:10 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-05 12:04:10 (GMT) |
commit | ee9f98d9f4b881ee15868a836a2b99271df1bc0e (patch) | |
tree | 5f5a6b4cc99c86d7ee99cf0c8287cf601abd99a7 /Objects/codeobject.c | |
parent | e40e2a2cc94c554e7e245a8ca5a7432d31a95766 (diff) | |
download | cpython-ee9f98d9f4b881ee15868a836a2b99271df1bc0e.zip cpython-ee9f98d9f4b881ee15868a836a2b99271df1bc0e.tar.gz cpython-ee9f98d9f4b881ee15868a836a2b99271df1bc0e.tar.bz2 |
bpo-42823: Fix frame lineno when frame.f_trace is set (GH-24099)
* Add test for frame.f_lineno with/without tracing.
* Make sure that frame.f_lineno is correct regardless of whether frame.f_trace is set.
* Update importlib
* Add NEWS
Diffstat (limited to 'Objects/codeobject.c')
-rw-r--r-- | Objects/codeobject.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Objects/codeobject.c b/Objects/codeobject.c index 0b0b8f9..f7613e8 100644 --- a/Objects/codeobject.c +++ b/Objects/codeobject.c @@ -1261,7 +1261,8 @@ PyLineTable_InitAddressRange(char *linetable, int firstlineno, PyCodeAddressRang range->lo_next = linetable; range->ar_start = -1; range->ar_end = 0; - range->ar_computed_line = range->ar_line = firstlineno; + range->ar_computed_line = firstlineno; + range->ar_line = -1; } int |