Serhiy Storchaka | 1009bf1 | 2015-04-03 23:53:51 +0300 | [diff] [blame] | 1 | /*[clinic input] |
| 2 | preserve |
| 3 | [clinic start generated code]*/ |
| 4 | |
| 5 | PyDoc_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 Storchaka | 92e8af6 | 2015-04-04 00:12:11 +0300 | [diff] [blame^] | 12 | {"_forget_codec", (PyCFunction)_codecs__forget_codec, METH_O, _codecs__forget_codec__doc__}, |
Serhiy Storchaka | 1009bf1 | 2015-04-03 23:53:51 +0300 | [diff] [blame] | 13 | |
| 14 | static PyObject * |
| 15 | _codecs__forget_codec_impl(PyModuleDef *module, const char *encoding); |
| 16 | |
| 17 | static PyObject * |
Serhiy Storchaka | 92e8af6 | 2015-04-04 00:12:11 +0300 | [diff] [blame^] | 18 | _codecs__forget_codec(PyModuleDef *module, PyObject *arg) |
Serhiy Storchaka | 1009bf1 | 2015-04-03 23:53:51 +0300 | [diff] [blame] | 19 | { |
| 20 | PyObject *return_value = NULL; |
| 21 | const char *encoding; |
| 22 | |
Serhiy Storchaka | 92e8af6 | 2015-04-04 00:12:11 +0300 | [diff] [blame^] | 23 | if (!PyArg_Parse(arg, |
Serhiy Storchaka | 1009bf1 | 2015-04-03 23:53:51 +0300 | [diff] [blame] | 24 | "s:_forget_codec", |
| 25 | &encoding)) |
| 26 | goto exit; |
| 27 | return_value = _codecs__forget_codec_impl(module, encoding); |
| 28 | |
| 29 | exit: |
| 30 | return return_value; |
| 31 | } |
Serhiy Storchaka | 92e8af6 | 2015-04-04 00:12:11 +0300 | [diff] [blame^] | 32 | /*[clinic end generated code: output=fc5ce4d3166f7d96 input=a9049054013a1b77]*/ |