summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2021-05-28 00:10:45 -0700
committerGitHub <noreply@github.com>2021-05-28 16:10:45 +0900
commit35be1f3602c8c66199d8c0a2f2805115864235fb (patch)
treeeb32472feb9e29b8b4e066617cc431a2bd6c6e67
parent448abe8d8bcfdf50a5ecae1196199da46bdfed04 (diff)
downloadcpython-git-35be1f3602c8c66199d8c0a2f2805115864235fb.tar.gz
bpo-44256: Do not expose _functools._list_elem_type (GH-26416)
It is internal use only type. (cherry picked from commit 28be3191a9db2769ed05e55c6bcbccdd029656dd) Co-authored-by: Inada Naoki <songofacandy@gmail.com>
-rw-r--r--Modules/_functoolsmodule.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/Modules/_functoolsmodule.c b/Modules/_functoolsmodule.c
index 19cfa9b07b..1cfb08caef 100644
--- a/Modules/_functoolsmodule.c
+++ b/Modules/_functoolsmodule.c
@@ -1460,9 +1460,8 @@ _functools_exec(PyObject *module)
if (state->lru_list_elem_type == NULL) {
return -1;
}
- if (PyModule_AddType(module, state->lru_list_elem_type) < 0) {
- return -1;
- }
+ // lru_list_elem is used only in _lru_cache_wrapper.
+ // So we don't expose it in module namespace.
return 0;
}