diff options
Diffstat (limited to 'Python/_warnings.c')
-rw-r--r-- | Python/_warnings.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Python/_warnings.c b/Python/_warnings.c index 2c9a2a76872..9c8815c1a3e 100644 --- a/Python/_warnings.c +++ b/Python/_warnings.c @@ -5,6 +5,7 @@ #include "pycore_pyerrors.h" #include "pycore_pystate.h" // _PyThreadState_GET() #include "frameobject.h" // PyFrame_GetBack() +#include "pycore_frame.h" #include "clinic/_warnings.c.h" #define MODULE_NAME "_warnings" @@ -853,7 +854,7 @@ setup_context(Py_ssize_t stack_level, PyObject **filename, int *lineno, *lineno = 1; } else { - globals = f->f_globals; + globals = _PyFrame_GetGlobals(f); PyCodeObject *code = PyFrame_GetCode(f); *filename = code->co_filename; Py_DECREF(code); |