File tree 2 files changed +5
-5
lines changed
2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -523,7 +523,7 @@ CTracer_handle_call(CTracer *self, PyFrameObject *frame)
523
523
* re-entering a generator also. f_lasti is -1 for a true call, and a
524
524
* real byte offset for a generator re-entry.
525
525
*/
526
- if (frame -> f_lasti < 0 ) {
526
+ if (MyFrame_lasti ( frame ) < 0 ) {
527
527
self -> pcur_entry -> last_line = - MyFrame_GetCode (frame )-> co_firstlineno ;
528
528
}
529
529
else {
Original file line number Diff line number Diff line change 15
15
// The f_lasti field changed meaning in 3.10.0a7. It had been bytes, but
16
16
// now is instructions, so we need to adjust it to use it as a byte index.
17
17
#if PY_VERSION_HEX >= 0x030A00A7
18
- #define MyFrame_lasti (f ) (f ->f_lasti * 2)
18
+ #define MyFrame_lasti (f ) ((f) ->f_lasti * 2)
19
19
#else
20
- #define MyFrame_lasti (f ) f ->f_lasti
21
- #endif // 3.10.0a7
20
+ #define MyFrame_lasti (f ) ((f) ->f_lasti)
21
+ #endif
22
22
23
23
// Access f_code should be done through a helper starting in 3.9.
24
24
#if PY_VERSION_HEX >= 0x03090000
25
25
#define MyFrame_GetCode (f ) (PyFrame_GetCode(f))
26
26
#else
27
27
#define MyFrame_GetCode (f ) ((f)->f_code)
28
- #endif // 3.11
28
+ #endif
29
29
30
30
/* The values returned to indicate ok or error. */
31
31
#define RET_OK 0
You can’t perform that action at this time.
0 commit comments