diff options
author | Inada Naoki <songofacandy@gmail.com> | 2021-05-28 05:09:32 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-28 05:09:32 (GMT) |
commit | 28be3191a9db2769ed05e55c6bcbccdd029656dd (patch) | |
tree | 3e0ed4abb702cef4f81c060bfbd79667fd6b9300 /Modules | |
parent | 28f12c9f4f39d283d823d81e311d863526dfdb54 (diff) | |
download | cpython-28be3191a9db2769ed05e55c6bcbccdd029656dd.zip cpython-28be3191a9db2769ed05e55c6bcbccdd029656dd.tar.gz cpython-28be3191a9db2769ed05e55c6bcbccdd029656dd.tar.bz2 |
bpo-44256: Do not expose _functools._list_elem_type (GH-26416)
It is internal use only type.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_functoolsmodule.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Modules/_functoolsmodule.c b/Modules/_functoolsmodule.c index 19cfa9b..1cfb08c 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; } |