bpo-40521: Add PyInterpreterState.unicode (GH-20081)
Move PyInterpreterState.fs_codec into a new
PyInterpreterState.unicode structure.
Give a name to the fs_codec structure and use this structure in
unicodeobject.c.
diff --git a/Modules/_io/textio.c b/Modules/_io/textio.c
index 1abc9ca..f2c72eb 100644
--- a/Modules/_io/textio.c
+++ b/Modules/_io/textio.c
@@ -1007,7 +1007,7 @@
/* Avoid calling PyCodec_LookupError() before the codec registry is ready:
before_PyUnicode_InitEncodings() is called. */
- if (!interp->fs_codec.encoding) {
+ if (!interp->unicode.fs_codec.encoding) {
return 0;
}