summaryrefslogtreecommitdiff
path: root/Modules/_codecsmodule.c
diff options
context:
space:
mode:
authorHai Shi <shihai1992@gmail.com>2020-10-16 16:34:15 +0800
committerGitHub <noreply@github.com>2020-10-16 10:34:15 +0200
commitc9f696cb96d1c362d5cad871f61da520572d9b08 (patch)
tree4dbc6f4960f9058660751bd860589a6e9762ccc7 /Modules/_codecsmodule.c
parentcf693e537dc8aaa14315a7f59baec4a31d1167d3 (diff)
downloadcpython-git-c9f696cb96d1c362d5cad871f61da520572d9b08.tar.gz
bpo-41919, test_codecs: Move codecs.register calls to setUp() (GH-22513)
* Move the codecs' (un)register operation to testcases. * Remove _codecs._forget_codec() and _PyCodec_Forget()
Diffstat (limited to 'Modules/_codecsmodule.c')
-rw-r--r--Modules/_codecsmodule.c20
1 files changed, 0 insertions, 20 deletions
diff --git a/Modules/_codecsmodule.c b/Modules/_codecsmodule.c
index 08a3d4ab02..2e8cb97fe7 100644
--- a/Modules/_codecsmodule.c
+++ b/Modules/_codecsmodule.c
@@ -160,25 +160,6 @@ _codecs_decode_impl(PyObject *module, PyObject *obj, const char *encoding,
/* --- Helpers ------------------------------------------------------------ */
-/*[clinic input]
-_codecs._forget_codec
-
- encoding: str
- /
-
-Purge the named codec from the internal codec lookup cache
-[clinic start generated code]*/
-
-static PyObject *
-_codecs__forget_codec_impl(PyObject *module, const char *encoding)
-/*[clinic end generated code: output=0bde9f0a5b084aa2 input=18d5d92d0e386c38]*/
-{
- if (_PyCodec_Forget(encoding) < 0) {
- return NULL;
- };
- Py_RETURN_NONE;
-}
-
static
PyObject *codec_tuple(PyObject *decoded,
Py_ssize_t len)
@@ -1057,7 +1038,6 @@ static PyMethodDef _codecs_functions[] = {
_CODECS_CODE_PAGE_DECODE_METHODDEF
_CODECS_REGISTER_ERROR_METHODDEF
_CODECS_LOOKUP_ERROR_METHODDEF
- _CODECS__FORGET_CODEC_METHODDEF
{NULL, NULL} /* sentinel */
};