blob: 084648f13d2c8a03724fbde51bc3fe2678eef2b9 [file] [log] [blame]
Serhiy Storchaka1009bf12015-04-03 23:53:51 +03001/*[clinic input]
2preserve
3[clinic start generated code]*/
4
5PyDoc_STRVAR(_codecs__forget_codec__doc__,
6"_forget_codec($module, encoding, /)\n"
7"--\n"
8"\n"
9"Purge the named codec from the internal codec lookup cache");
10
11#define _CODECS__FORGET_CODEC_METHODDEF \
Serhiy Storchaka92e8af62015-04-04 00:12:11 +030012 {"_forget_codec", (PyCFunction)_codecs__forget_codec, METH_O, _codecs__forget_codec__doc__},
Serhiy Storchaka1009bf12015-04-03 23:53:51 +030013
14static PyObject *
15_codecs__forget_codec_impl(PyModuleDef *module, const char *encoding);
16
17static PyObject *
Serhiy Storchaka92e8af62015-04-04 00:12:11 +030018_codecs__forget_codec(PyModuleDef *module, PyObject *arg)
Serhiy Storchaka1009bf12015-04-03 23:53:51 +030019{
20 PyObject *return_value = NULL;
21 const char *encoding;
22
Serhiy Storchaka92e8af62015-04-04 00:12:11 +030023 if (!PyArg_Parse(arg,
Serhiy Storchaka1009bf12015-04-03 23:53:51 +030024 "s:_forget_codec",
25 &encoding))
26 goto exit;
27 return_value = _codecs__forget_codec_impl(module, encoding);
28
29exit:
30 return return_value;
31}
Serhiy Storchaka92e8af62015-04-04 00:12:11 +030032/*[clinic end generated code: output=fc5ce4d3166f7d96 input=a9049054013a1b77]*/