diff options
Diffstat (limited to 'coverage/ctracer/util.h')
-rw-r--r-- | coverage/ctracer/util.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/coverage/ctracer/util.h b/coverage/ctracer/util.h index 5cba9b30..420b1cbb 100644 --- a/coverage/ctracer/util.h +++ b/coverage/ctracer/util.h @@ -44,6 +44,14 @@ #endif /* Py3k */ +// The f_lasti field changed meaning in 3.10.0a7. It had been bytes, but +// now is instructions, so we need to adjust it to use it as a byte index. +#if PY_VERSION_HEX >= 0x030A00A7 +#define MyFrame_lasti(f) (f->f_lasti * 2) +#else +#define MyFrame_lasti(f) f->f_lasti +#endif // 3.10.0a7 + // Undocumented, and not in all 2.7.x, so our own copy of it. #define My_XSETREF(op, op2) \ do { \ |