Message400033
It is not `PyCode_Addr2Line()` that has changed, but `frame->f_lasti`.
If you call
`PyCode_Addr2Line(frame->f_code, 8)` in 3.9
you get the same behavior as calling
`PyCode_Addr2Line(frame->f_code, 8)` in 3.10.
Assuming the bytecode is unchanged.
The difference is that for the nth instruction `frame->f_lasti` is n*2 for 3.9 and n for 3.10.
People should be using `PyFrame_GetLineNumber()`, which is part of the API. |
|
Date |
User |
Action |
Args |
2021-08-21 15:02:22 | Mark.Shannon | set | recipients:
+ Mark.Shannon, pablogsal |
2021-08-21 15:02:22 | Mark.Shannon | set | messageid: <1629558142.96.0.973379723433.issue44964@roundup.psfhosted.org> |
2021-08-21 15:02:22 | Mark.Shannon | link | issue44964 messages |
2021-08-21 15:02:22 | Mark.Shannon | create | |
|