summaryrefslogtreecommitdiffstats
path: root/Include/cpython/pystate.h
diff options
context:
space:
mode:
authorEric Snow <ericsnowcurrently@gmail.com>2022-02-01 17:02:25 (GMT)
committerGitHub <noreply@github.com>2022-02-01 17:02:25 (GMT)
commitf78be59c83c151d94902daef56218530c52e29e7 (patch)
tree5c671e025527b44b3bb65bafbf6482ce592f39ff /Include/cpython/pystate.h
parent64568acbd88a88d54ac9b8215447f88280448dd5 (diff)
downloadcpython-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 'Include/cpython/pystate.h')
-rw-r--r--Include/cpython/pystate.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/Include/cpython/pystate.h b/Include/cpython/pystate.h
index a35e5b8..74dd44d 100644
--- a/Include/cpython/pystate.h
+++ b/Include/cpython/pystate.h
@@ -187,16 +187,19 @@ struct _ts {
/* The following fields are here to avoid allocation during init.
The data is exposed through PyThreadState pointer fields.
These fields should not be accessed directly outside of init.
+ This is indicated by an underscore prefix on the field names.
All other PyInterpreterState pointer fields are populated when
needed and default to NULL.
*/
+ // Note some fields do not have a leading underscore for backward
+ // compatibility. See https://bugs.python.org/issue45953#msg412046.
/* The thread's exception stack entry. (Always the last entry.) */
- _PyErr_StackItem _exc_state;
+ _PyErr_StackItem exc_state;
/* The bottom-most frame on the stack. */
- CFrame _root_cframe;
+ CFrame root_cframe;
};