8000 bpo-41842: Add a unregister function in _codecs module by shihai1991 · Pull Request #22360 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-41842: Add a unregister function in _codecs module #22360

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 15 commits into from
Sep 28, 2020
Merged
Prev Previous commit
Next Next commit
apply victor's comment
  • Loading branch information
shihai1991 committed Sep 26, 2020
commit 4308ea8fc744e377bfeab38157767cecfe377e10
2 changes: 1 addition & 1 deletion Python/codecs.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ PyCodec_Unregister(PyObject *search_function)
PyObject *item = PyList_GET_ITEM(codec_search_path, i);
if (item == search_function) {
if (interp->codec_search_cache != NULL) {
assert(PyDict_Check(interp->codec_search_cache));
assert(PyDict_CheckExact(interp->codec_search_cache));
PyDict_Clear(interp->codec_search_cache);
}
return PyList_SetSlice(codec_search_path, i, i+1, NULL);
Expand Down
0