summaryrefslogtreecommitdiffstats
path: root/Objects/structseq.c
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2021-04-02 13:28:13 (GMT)
committerGitHub <noreply@github.com>2021-04-02 13:28:13 (GMT)
commit442ad74fc2928b095760eb89aba93c28eab17f9b (patch)
tree29f784c0860f41cd6d2c16d34e8ced47ebf5e005 /Objects/structseq.c
parent58384c6ab01bbc35cc14cdeb716f6c45a3df426b (diff)
downloadcpython-442ad74fc2928b095760eb89aba93c28eab17f9b.zip
cpython-442ad74fc2928b095760eb89aba93c28eab17f9b.tar.gz
cpython-442ad74fc2928b095760eb89aba93c28eab17f9b.tar.bz2
bpo-43687: Py_Initialize() creates singletons earlier (GH-25147)
Reorganize pycore_interp_init() to initialize singletons before the the first PyType_Ready() call. Fix an issue when Python is configured using --without-doc-strings.
Diffstat (limited to 'Objects/structseq.c')
-rw-r--r--Objects/structseq.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Objects/structseq.c b/Objects/structseq.c
index 8a92bdb..88e63b6 100644
--- a/Objects/structseq.c
+++ b/Objects/structseq.c
@@ -579,7 +579,8 @@ int _PyStructSequence_Init(void)
if (_PyUnicode_FromId(&PyId_n_sequence_fields) == NULL
|| _PyUnicode_FromId(&PyId_n_fields) == NULL
|| _PyUnicode_FromId(&PyId_n_unnamed_fields) == NULL)
+ {
return -1;
-
+ }
return 0;
}