diff options
author | Eric Snow <ericsnowcurrently@gmail.com> | 2022-02-01 17:02:25 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-02-01 17:02:25 (GMT) |
commit | f78be59c83c151d94902daef56218530c52e29e7 (patch) | |
tree | 5c671e025527b44b3bb65bafbf6482ce592f39ff /Python/pystate.c | |
parent | 64568acbd88a88d54ac9b8215447f88280448dd5 (diff) | |
download | cpython-f78be59c83c151d94902daef56218530c52e29e7.zip cpython-f78be59c83c151d94902daef56218530c52e29e7.tar.gz cpython-f78be59c83c151d94902daef56218530c52e29e7.tar.bz2 |
bpo-45953: Preserve backward compatibility on some PyThreadState field names. (GH-31038)
The gevent project is using the two `PyThreadState` fields I renamed in gh-30590. This PR fixes the names. See #msg412046.
Diffstat (limited to 'Python/pystate.c')
-rw-r--r-- | Python/pystate.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Python/pystate.c b/Python/pystate.c index 4b698f2..4378d78 100644 --- a/Python/pystate.c +++ b/Python/pystate.c @@ -776,9 +776,9 @@ init_threadstate(PyThreadState *tstate, tstate->recursion_limit = interp->ceval.recursion_limit, tstate->recursion_remaining = interp->ceval.recursion_limit, - tstate->exc_info = &tstate->_exc_state; + tstate->exc_info = &tstate->exc_state; - tstate->cframe = &tstate->_root_cframe; + tstate->cframe = &tstate->root_cframe; tstate->datastack_chunk = NULL; tstate->datastack_top = NULL; tstate->datastack_limit = NULL; @@ -1016,10 +1016,10 @@ PyThreadState_Clear(PyThreadState *tstate) Py_CLEAR(tstate->curexc_value); Py_CLEAR(tstate->curexc_traceback); - Py_CLEAR(tstate->_exc_state.exc_value); + Py_CLEAR(tstate->exc_state.exc_value); /* The stack of exception states should contain just this thread. */ - if (verbose && tstate->exc_info != &tstate->_exc_state) { + if (verbose && tstate->exc_info != &tstate->exc_state) { fprintf(stderr, "PyThreadState_Clear: warning: thread still has a generator\n"); } |