aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Python/pylifecycle.c
diff options
context:
space:
mode:
authorDonghee Na <donghee.na@python.org>2024-04-19 00:18:22 +0900
committerGitHub <noreply@github.com>2024-04-19 00:18:22 +0900
commit94444ea45a86ae46e0c11d1917c43c4c271018cd (patch)
tree603c48be6648e272d271d4f04cebaea12def1363 /Python/pylifecycle.c
parent40f4d641a93b1cba89be4bc7b26cdb481e0450d5 (diff)
downloadcpython-94444ea45a86ae46e0c11d1917c43c4c271018cd.tar.gz
cpython-94444ea45a86ae46e0c11d1917c43c4c271018cd.zip
gh-112069: Add _PySet_NextEntryRef to be thread-safe. (gh-117990)
Diffstat (limited to 'Python/pylifecycle.c')
-rw-r--r--Python/pylifecycle.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/Python/pylifecycle.c b/Python/pylifecycle.c
index efb25878312..cc1824634e7 100644
--- a/Python/pylifecycle.c
+++ b/Python/pylifecycle.c
@@ -2910,6 +2910,7 @@ _Py_DumpExtensionModules(int fd, PyInterpreterState *interp)
Py_ssize_t i = 0;
PyObject *item;
Py_hash_t hash;
+ // if stdlib_module_names is not NULL, it is always a frozenset.
while (_PySet_NextEntry(stdlib_module_names, &i, &item, &hash)) {
if (PyUnicode_Check(item)
&& PyUnicode_Compare(key, item) == 0)