diff options
author | Eric Snow <ericsnowcurrently@gmail.com> | 2022-11-16 09:37:14 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-16 09:37:14 -0700 |
commit | 5f55067e238c21de25f09ece9bb24ae8c42d02b4 (patch) | |
tree | f3fbce5e16aaa3a8871518c4ccb18bc8a1d86e9e /Python/pythonrun.c | |
parent | 5cfb7d19f5242c9b8ffd2fe30a24569e85a99e1d (diff) | |
download | cpython-git-5f55067e238c21de25f09ece9bb24ae8c42d02b4.tar.gz |
gh-81057: Move More Globals in Core Code to _PyRuntimeState (gh-99516)
https://github.com/python/cpython/issues/81057
Diffstat (limited to 'Python/pythonrun.c')
-rw-r--r-- | Python/pythonrun.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Python/pythonrun.c b/Python/pythonrun.c index 1c7ac4af63..eead707b54 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -1688,7 +1688,8 @@ run_eval_code_obj(PyThreadState *tstate, PyCodeObject *co, PyObject *globals, Py * uncaught exception to trigger an unexplained signal exit from a future * Py_Main() based one. */ - _Py_UnhandledKeyboardInterrupt = 0; + // XXX Isn't this dealt with by the move to _PyRuntimeState? + _PyRuntime.signals.unhandled_keyboard_interrupt = 0; /* Set globals['__builtins__'] if it doesn't exist */ if (globals != NULL && _PyDict_GetItemStringWithError(globals, "__builtins__") == NULL) { @@ -1702,7 +1703,7 @@ run_eval_code_obj(PyThreadState *tstate, PyCodeObject *co, PyObject *globals, Py v = PyEval_EvalCode((PyObject*)co, globals, locals); if (!v && _PyErr_Occurred(tstate) == PyExc_KeyboardInterrupt) { - _Py_UnhandledKeyboardInterrupt = 1; + _PyRuntime.signals.unhandled_keyboard_interrupt = 1; } return v; } |