diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-07-07 15:20:03 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-07-07 15:20:03 (GMT) |
commit | 2954f8399914c77e048f9e3358abfadb7a3f76e9 (patch) | |
tree | c8398eb8aa516e897bbafe9e43cb115d0365bcb0 /Modules/_codecsmodule.c | |
parent | 50600a78cb6b0e4ea47033a2fd5e982c20a5d946 (diff) | |
parent | 1a2b24f02dfd4eb3383f6ae2b59e5a4eb66fd5bb (diff) | |
download | cpython-2954f8399914c77e048f9e3358abfadb7a3f76e9.zip cpython-2954f8399914c77e048f9e3358abfadb7a3f76e9.tar.gz cpython-2954f8399914c77e048f9e3358abfadb7a3f76e9.tar.bz2 |
- Issue #27332: Fixed the type of the first argument of module-level functions
generated by Argument Clinic. Patch by Petr Viktorin.
Diffstat (limited to 'Modules/_codecsmodule.c')
-rw-r--r-- | Modules/_codecsmodule.c | 183 |
1 files changed, 91 insertions, 92 deletions
diff --git a/Modules/_codecsmodule.c b/Modules/_codecsmodule.c index 611ca82..4e75995 100644 --- a/Modules/_codecsmodule.c +++ b/Modules/_codecsmodule.c @@ -60,8 +60,8 @@ all lower case letters, and either return None, or a tuple of functions [clinic start generated code]*/ static PyObject * -_codecs_register(PyModuleDef *module, PyObject *search_function) -/*[clinic end generated code: output=d17608b6ad380eb8 input=369578467955cae4]*/ +_codecs_register(PyObject *module, PyObject *search_function) +/*[clinic end generated code: output=d1bf21e99db7d6d3 input=369578467955cae4]*/ { if (PyCodec_Register(search_function)) return NULL; @@ -78,8 +78,8 @@ Looks up a codec tuple in the Python codec registry and returns a CodecInfo obje [clinic start generated code]*/ static PyObject * -_codecs_lookup_impl(PyModuleDef *module, const char *encoding) -/*[clinic end generated code: output=798e41aff0c04ef6 input=3c572c0db3febe9c]*/ +_codecs_lookup_impl(PyObject *module, const char *encoding) +/*[clinic end generated code: output=9f0afa572080c36d input=3c572c0db3febe9c]*/ { return _PyCodec_Lookup(encoding); } @@ -100,9 +100,9 @@ codecs.register_error that can handle ValueErrors. [clinic start generated code]*/ static PyObject * -_codecs_encode_impl(PyModuleDef *module, PyObject *obj, const char *encoding, +_codecs_encode_impl(PyObject *module, PyObject *obj, const char *encoding, const char *errors) -/*[clinic end generated code: output=5c073f62249c8d7c input=cd5b685040ff61f0]*/ +/*[clinic end generated code: output=385148eb9a067c86 input=cd5b685040ff61f0]*/ { if (encoding == NULL) encoding = PyUnicode_GetDefaultEncoding(); @@ -127,9 +127,9 @@ codecs.register_error that can handle ValueErrors. [clinic start generated code]*/ static PyObject * -_codecs_decode_impl(PyModuleDef *module, PyObject *obj, const char *encoding, +_codecs_decode_impl(PyObject *module, PyObject *obj, const char *encoding, const char *errors) -/*[clinic end generated code: output=c81cbf6189a7f878 input=7702c0cc2fa1add6]*/ +/*[clinic end generated code: output=679882417dc3a0bd input=7702c0cc2fa1add6]*/ { if (encoding == NULL) encoding = PyUnicode_GetDefaultEncoding(); @@ -150,8 +150,8 @@ Purge the named codec from the internal codec lookup cache [clinic start generated code]*/ static PyObject * -_codecs__forget_codec_impl(PyModuleDef *module, const char *encoding) -/*[clinic end generated code: output=b56a9b99d2d28080 input=18d5d92d0e386c38]*/ +_codecs__forget_codec_impl(PyObject *module, const char *encoding) +/*[clinic end generated code: output=0bde9f0a5b084aa2 input=18d5d92d0e386c38]*/ { if (_PyCodec_Forget(encoding) < 0) { return NULL; @@ -177,9 +177,9 @@ _codecs.escape_decode [clinic start generated code]*/ static PyObject * -_codecs_escape_decode_impl(PyModuleDef *module, Py_buffer *data, +_codecs_escape_decode_impl(PyObject *module, Py_buffer *data, const char *errors) -/*[clinic end generated code: output=648fa3e78d03e658 input=0018edfd99db714d]*/ +/*[clinic end generated code: output=505200ba8056979a input=0018edfd99db714d]*/ { PyObject *decoded = PyBytes_DecodeEscape(data->buf, data->len, errors, 0, NULL); @@ -194,9 +194,9 @@ _codecs.escape_encode [clinic start generated code]*/ static PyObject * -_codecs_escape_encode_impl(PyModuleDef *module, PyObject *data, +_codecs_escape_encode_impl(PyObject *module, PyObject *data, const char *errors) -/*[clinic end generated code: output=fcd6f34fe4111c50 input=da9ded00992f32f2]*/ +/*[clinic end generated code: output=4af1d477834bab34 input=da9ded00992f32f2]*/ { Py_ssize_t size; Py_ssize_t newsize; @@ -258,9 +258,9 @@ _codecs.unicode_internal_decode [clinic start generated code]*/ static PyObject * -_codecs_unicode_internal_decode_impl(PyModuleDef *module, PyObject *obj, +_codecs_unicode_internal_decode_impl(PyObject *module, PyObject *obj, const char *errors) -/*[clinic end generated code: output=9fe47c2cd8807d92 input=8d57930aeda170c6]*/ +/*[clinic end generated code: output=edbfe175e09eff9a input=8d57930aeda170c6]*/ { if (PyUnicode_Check(obj)) { if (PyUnicode_READY(obj) < 0) @@ -291,9 +291,9 @@ _codecs.utf_7_decode [clinic start generated code]*/ static PyObject * -_codecs_utf_7_decode_impl(PyModuleDef *module, Py_buffer *data, +_codecs_utf_7_decode_impl(PyObject *module, Py_buffer *data, const char *errors, int final) -/*[clinic end generated code: output=ca945e907e72e827 input=bc4d6247ecdb01e6]*/ +/*[clinic end generated code: output=0cd3a944a32a4089 input=bc4d6247ecdb01e6]*/ { Py_ssize_t consumed = data->len; PyObject *decoded = PyUnicode_DecodeUTF7Stateful(data->buf, data->len, @@ -311,9 +311,9 @@ _codecs.utf_8_decode [clinic start generated code]*/ static PyObject * -_codecs_utf_8_decode_impl(PyModuleDef *module, Py_buffer *data, +_codecs_utf_8_decode_impl(PyObject *module, Py_buffer *data, const char *errors, int final) -/*[clinic end generated code: output=7309f9ff4ef5c9b6 input=39161d71e7422ee2]*/ +/*[clinic end generated code: output=10f74dec8d9bb8bf input=39161d71e7422ee2]*/ { Py_ssize_t consumed = data->len; PyObject *decoded = PyUnicode_DecodeUTF8Stateful(data->buf, data->len, @@ -331,9 +331,9 @@ _codecs.utf_16_decode [clinic start generated code]*/ static PyObject * -_codecs_utf_16_decode_impl(PyModuleDef *module, Py_buffer *data, +_codecs_utf_16_decode_impl(PyObject *module, Py_buffer *data, const char *errors, int final) -/*[clinic end generated code: output=8d2fa0507d9bef2c input=f3cf01d1461007ce]*/ +/*[clinic end generated code: output=783b442abcbcc2d0 input=f3cf01d1461007ce]*/ { int byteorder = 0; /* This is overwritten unless final is true. */ @@ -353,9 +353,9 @@ _codecs.utf_16_le_decode [clinic start generated code]*/ static PyObject * -_codecs_utf_16_le_decode_impl(PyModuleDef *module, Py_buffer *data, +_codecs_utf_16_le_decode_impl(PyObject *module, Py_buffer *data, const char *errors, int final) -/*[clinic end generated code: output=4fd621515ef4ce18 input=a77e3bf97335d94e]*/ +/*[clinic end generated code: output=899b9e6364379dcd input=a77e3bf97335d94e]*/ { int byteorder = -1; /* This is overwritten unless final is true. */ @@ -375,9 +375,9 @@ _codecs.utf_16_be_decode [clinic start generated code]*/ static PyObject * -_codecs_utf_16_be_decode_impl(PyModuleDef *module, Py_buffer *data, +_codecs_utf_16_be_decode_impl(PyObject *module, Py_buffer *data, const char *errors, int final) -/*[clinic end generated code: output=792f4eacb3e1fa05 input=606f69fae91b5563]*/ +/*[clinic end generated code: output=49f6465ea07669c8 input=606f69fae91b5563]*/ { int byteorder = 1; /* This is overwritten unless final is true. */ @@ -405,9 +405,9 @@ _codecs.utf_16_ex_decode [clinic start generated code]*/ static PyObject * -_codecs_utf_16_ex_decode_impl(PyModuleDef *module, Py_buffer *data, +_codecs_utf_16_ex_decode_impl(PyObject *module, Py_buffer *data, const char *errors, int byteorder, int final) -/*[clinic end generated code: output=f136a186dc2defa0 input=f6e7f697658c013e]*/ +/*[clinic end generated code: output=0f385f251ecc1988 input=f6e7f697658c013e]*/ { /* This is overwritten unless final is true. */ Py_ssize_t consumed = data->len; @@ -429,9 +429,9 @@ _codecs.utf_32_decode [clinic start generated code]*/ static PyObject * -_codecs_utf_32_decode_impl(PyModuleDef *module, Py_buffer *data, +_codecs_utf_32_decode_impl(PyObject *module, Py_buffer *data, const char *errors, int final) -/*[clinic end generated code: output=b7635e55857e8efb input=86d4f41c6c2e763d]*/ +/*[clinic end generated code: output=2fc961807f7b145f input=86d4f41c6c2e763d]*/ { int byteorder = 0; /* This is overwritten unless final is true. */ @@ -451,9 +451,9 @@ _codecs.utf_32_le_decode [clinic start generated code]*/ static PyObject * -_codecs_utf_32_le_decode_impl(PyModuleDef *module, Py_buffer *data, +_codecs_utf_32_le_decode_impl(PyObject *module, Py_buffer *data, const char *errors, int final) -/*[clinic end generated code: output=a79d1787d8ddf988 input=d18b650772d188ba]*/ +/*[clinic end generated code: output=ec8f46b67a94f3e6 input=d18b650772d188ba]*/ { int byteorder = -1; /* This is overwritten unless final is true. */ @@ -473,9 +473,9 @@ _codecs.utf_32_be_decode [clinic start generated code]*/ static PyObject * -_codecs_utf_32_be_decode_impl(PyModuleDef *module, Py_buffer *data, +_codecs_utf_32_be_decode_impl(PyObject *module, Py_buffer *data, const char *errors, int final) -/*[clinic end generated code: output=a8356b0f36779981 input=19c271b5d34926d8]*/ +/*[clinic end generated code: output=ff82bae862c92c4e input=19c271b5d34926d8]*/ { int byteorder = 1; /* This is overwritten unless final is true. */ @@ -503,9 +503,9 @@ _codecs.utf_32_ex_decode [clinic start generated code]*/ static PyObject * -_codecs_utf_32_ex_decode_impl(PyModuleDef *module, Py_buffer *data, +_codecs_utf_32_ex_decode_impl(PyObject *module, Py_buffer *data, const char *errors, int byteorder, int final) -/*[clinic end generated code: output=ab8c70977c1992f5 input=4af3e6ccfe34a076]*/ +/*[clinic end generated code: output=6bfb177dceaf4848 input=4af3e6ccfe34a076]*/ { Py_ssize_t consumed = data->len; PyObject *decoded = PyUnicode_DecodeUTF32Stateful(data->buf, data->len, @@ -524,9 +524,9 @@ _codecs.unicode_escape_decode [clinic start generated code]*/ static PyObject * -_codecs_unicode_escape_decode_impl(PyModuleDef *module, Py_buffer *data, +_codecs_unicode_escape_decode_impl(PyObject *module, Py_buffer *data, const char *errors) -/*[clinic end generated code: output=d1aa63f2620c4999 input=49fd27d06813a7f5]*/ +/*[clinic end generated code: output=3ca3c917176b82ab input=49fd27d06813a7f5]*/ { PyObject *decoded = PyUnicode_DecodeUnicodeEscape(data->buf, data->len, errors); @@ -541,9 +541,9 @@ _codecs.raw_unicode_escape_decode [clinic start generated code]*/ static PyObject * -_codecs_raw_unicode_escape_decode_impl(PyModuleDef *module, Py_buffer *data, +_codecs_raw_unicode_escape_decode_impl(PyObject *module, Py_buffer *data, const char *errors) -/*[clinic end generated code: output=0bf96cc182d81379 input=770903a211434ebc]*/ +/*[clinic end generated code: output=c98eeb56028070a6 input=770903a211434ebc]*/ { PyObject *decoded = PyUnicode_DecodeRawUnicodeEscape(data->buf, data->len, errors); @@ -558,9 +558,9 @@ _codecs.latin_1_decode [clinic start generated code]*/ static PyObject * -_codecs_latin_1_decode_impl(PyModuleDef *module, Py_buffer *data, +_codecs_latin_1_decode_impl(PyObject *module, Py_buffer *data, const char *errors) -/*[clinic end generated code: output=66b916f5055aaf13 input=5cad0f1759c618ec]*/ +/*[clinic end generated code: output=07f3dfa3f72c7d8f input=5cad0f1759c618ec]*/ { PyObject *decoded = PyUnicode_DecodeLatin1(data->buf, data->len, errors); return codec_tuple(decoded, data->len); @@ -574,9 +574,9 @@ _codecs.ascii_decode [clinic start generated code]*/ static PyObject * -_codecs_ascii_decode_impl(PyModuleDef *module, Py_buffer *data, +_codecs_ascii_decode_impl(PyObject *module, Py_buffer *data, const char *errors) -/*[clinic end generated code: output=7f213a1b5cdafc65 input=ad1106f64037bd16]*/ +/*[clinic end generated code: output=2627d72058d42429 input=ad1106f64037bd16]*/ { PyObject *decoded = PyUnicode_DecodeASCII(data->buf, data->len, errors); return codec_tuple(decoded, data->len); @@ -591,9 +591,9 @@ _codecs.charmap_decode [clinic start generated code]*/ static PyObject * -_codecs_charmap_decode_impl(PyModuleDef *module, Py_buffer *data, +_codecs_charmap_decode_impl(PyObject *module, Py_buffer *data, const char *errors, PyObject *mapping) -/*[clinic end generated code: output=87d27f365098bbae input=19712ca35c5a80e2]*/ +/*[clinic end generated code: output=2c335b09778cf895 input=19712ca35c5a80e2]*/ { PyObject *decoded; @@ -615,9 +615,9 @@ _codecs.mbcs_decode [clinic start generated code]*/ static PyObject * -_codecs_mbcs_decode_impl(PyModuleDef *module, Py_buffer *data, +_codecs_mbcs_decode_impl(PyObject *module, Py_buffer *data, const char *errors, int final) -/*[clinic end generated code: output=0ebaf3a5b20e53fa input=d492c1ca64f4fa8a]*/ +/*[clinic end generated code: output=39b65b8598938c4b input=d492c1ca64f4fa8a]*/ { Py_ssize_t consumed = data->len; PyObject *decoded = PyUnicode_DecodeMBCSStateful(data->buf, data->len, @@ -635,9 +635,9 @@ _codecs.code_page_decode [clinic start generated code]*/ static PyObject * -_codecs_code_page_decode_impl(PyModuleDef *module, int codepage, +_codecs_code_page_decode_impl(PyObject *module, int codepage, Py_buffer *data, const char *errors, int final) -/*[clinic end generated code: output=4318e3d9971e31ba input=4f3152a304e21d51]*/ +/*[clinic end generated code: output=53008ea967da3fff input=4f3152a304e21d51]*/ { Py_ssize_t consumed = data->len; PyObject *decoded = PyUnicode_DecodeCodePageStateful(codepage, @@ -659,9 +659,9 @@ _codecs.readbuffer_encode [clinic start generated code]*/ static PyObject * -_codecs_readbuffer_encode_impl(PyModuleDef *module, Py_buffer *data, +_codecs_readbuffer_encode_impl(PyObject *module, Py_buffer *data, const char *errors) -/*[clinic end generated code: output=319cc24083299859 input=b7c322b89d4ab923]*/ +/*[clinic end generated code: output=c645ea7cdb3d6e86 input=b7c322b89d4ab923]*/ { PyObject *result = PyBytes_FromStringAndSize(data->buf, data->len); return codec_tuple(result, data->len); @@ -675,9 +675,9 @@ _codecs.unicode_internal_encode [clinic start generated code]*/ static PyObject * -_codecs_unicode_internal_encode_impl(PyModuleDef *module, PyObject *obj, +_codecs_unicode_internal_encode_impl(PyObject *module, PyObject *obj, const char *errors) -/*[clinic end generated code: output=be08457068ad503b input=8628f0280cf5ba61]*/ +/*[clinic end generated code: output=a72507dde4ea558f input=8628f0280cf5ba61]*/ { if (PyErr_WarnEx(PyExc_DeprecationWarning, "unicode_internal codec has been deprecated", @@ -720,9 +720,9 @@ _codecs.utf_7_encode [clinic start generated code]*/ static PyObject * -_codecs_utf_7_encode_impl(PyModuleDef *module, PyObject *str, +_codecs_utf_7_encode_impl(PyObject *module, PyObject *str, const char *errors) -/*[clinic end generated code: output=a7accc496a32b759 input=d1a47579e79cbe15]*/ +/*[clinic end generated code: output=0feda21ffc921bc8 input=d1a47579e79cbe15]*/ { return codec_tuple(_PyUnicode_EncodeUTF7(str, 0, 0, errors), PyUnicode_GET_LENGTH(str)); @@ -736,9 +736,9 @@ _codecs.utf_8_encode [clinic start generated code]*/ static PyObject * -_codecs_utf_8_encode_impl(PyModuleDef *module, PyObject *str, +_codecs_utf_8_encode_impl(PyObject *module, PyObject *str, const char *errors) -/*[clinic end generated code: output=ec831d80e7aedede input=42e3ba73c4392eef]*/ +/*[clinic end generated code: output=02bf47332b9c796c input=42e3ba73c4392eef]*/ { return codec_tuple(_PyUnicode_AsUTF8String(str, errors), PyUnicode_GET_LENGTH(str)); @@ -760,9 +760,9 @@ _codecs.utf_16_encode [clinic start generated code]*/ static PyObject * -_codecs_utf_16_encode_impl(PyModuleDef *module, PyObject *str, +_codecs_utf_16_encode_impl(PyObject *module, PyObject *str, const char *errors, int byteorder) -/*[clinic end generated code: output=93ac58e960a9ee4d input=ff46416b04edb944]*/ +/*[clinic end generated code: output=c654e13efa2e64e4 input=ff46416b04edb944]*/ { return codec_tuple(_PyUnicode_EncodeUTF16(str, errors, byteorder), PyUnicode_GET_LENGTH(str)); @@ -776,9 +776,9 @@ _codecs.utf_16_le_encode [clinic start generated code]*/ static PyObject * -_codecs_utf_16_le_encode_impl(PyModuleDef *module, PyObject *str, +_codecs_utf_16_le_encode_impl(PyObject *module, PyObject *str, const char *errors) -/*[clinic end generated code: output=422bedb8da34fb66 input=cb385455ea8f2fe0]*/ +/*[clinic end generated code: output=431b01e55f2d4995 input=cb385455ea8f2fe0]*/ { return codec_tuple(_PyUnicode_EncodeUTF16(str, errors, -1), PyUnicode_GET_LENGTH(str)); @@ -792,9 +792,9 @@ _codecs.utf_16_be_encode [clinic start generated code]*/ static PyObject * -_codecs_utf_16_be_encode_impl(PyModuleDef *module, PyObject *str, +_codecs_utf_16_be_encode_impl(PyObject *module, PyObject *str, const char *errors) -/*[clinic end generated code: output=3aa7ee9502acdd77 input=9119997066bdaefd]*/ +/*[clinic end generated code: output=96886a6fd54dcae3 input=9119997066bdaefd]*/ { return codec_tuple(_PyUnicode_EncodeUTF16(str, errors, +1), PyUnicode_GET_LENGTH(str)); @@ -816,9 +816,9 @@ _codecs.utf_32_encode [clinic start generated code]*/ static PyObject * -_codecs_utf_32_encode_impl(PyModuleDef *module, PyObject *str, +_codecs_utf_32_encode_impl(PyObject *module, PyObject *str, const char *errors, int byteorder) -/*[clinic end generated code: output=3e7d5a003b02baed input=c5e77da82fbe5c2a]*/ +/*[clinic end generated code: output=5c760da0c09a8b83 input=c5e77da82fbe5c2a]*/ { return codec_tuple(_PyUnicode_EncodeUTF32(str, errors, byteorder), PyUnicode_GET_LENGTH(str)); @@ -832,9 +832,9 @@ _codecs.utf_32_le_encode [clinic start generated code]*/ static PyObject * -_codecs_utf_32_le_encode_impl(PyModuleDef *module, PyObject *str, +_codecs_utf_32_le_encode_impl(PyObject *module, PyObject *str, const char *errors) -/*[clinic end generated code: output=5dda641cd33dbfc2 input=9993b25fe0877848]*/ +/*[clinic end generated code: output=b65cd176de8e36d6 input=9993b25fe0877848]*/ { return codec_tuple(_PyUnicode_EncodeUTF32(str, errors, -1), PyUnicode_GET_LENGTH(str)); @@ -848,9 +848,9 @@ _codecs.utf_32_be_encode [clinic start generated code]*/ static PyObject * -_codecs_utf_32_be_encode_impl(PyModuleDef *module, PyObject *str, +_codecs_utf_32_be_encode_impl(PyObject *module, PyObject *str, const char *errors) -/*[clinic end generated code: output=ccca8b44d91a7c7a input=d3e0ccaa02920431]*/ +/*[clinic end generated code: output=1d9e71a9358709e9 input=d3e0ccaa02920431]*/ { return codec_tuple(_PyUnicode_EncodeUTF32(str, errors, +1), PyUnicode_GET_LENGTH(str)); @@ -864,9 +864,9 @@ _codecs.unicode_escape_encode [clinic start generated code]*/ static PyObject * -_codecs_unicode_escape_encode_impl(PyModuleDef *module, PyObject *str, +_codecs_unicode_escape_encode_impl(PyObject *module, PyObject *str, const char *errors) -/*[clinic end generated code: output=389f23d2b8f8d80b input=65d9eefca65b455a]*/ +/*[clinic end generated code: output=66271b30bc4f7a3c input=65d9eefca65b455a]*/ { return codec_tuple(PyUnicode_AsUnicodeEscapeString(str), PyUnicode_GET_LENGTH(str)); @@ -880,9 +880,9 @@ _codecs.raw_unicode_escape_encode [clinic start generated code]*/ static PyObject * -_codecs_raw_unicode_escape_encode_impl(PyModuleDef *module, PyObject *str, +_codecs_raw_unicode_escape_encode_impl(PyObject *module, PyObject *str, const char *errors) -/*[clinic end generated code: output=fec4e39d6ec37a62 input=5aa33e4a133391ab]*/ +/*[clinic end generated code: output=a66a806ed01c830a input=5aa33e4a133391ab]*/ { return codec_tuple(PyUnicode_AsRawUnicodeEscapeString(str), PyUnicode_GET_LENGTH(str)); @@ -896,9 +896,9 @@ _codecs.latin_1_encode [clinic start generated code]*/ static PyObject * -_codecs_latin_1_encode_impl(PyModuleDef *module, PyObject *str, +_codecs_latin_1_encode_impl(PyObject *module, PyObject *str, const char *errors) -/*[clinic end generated code: output=ecf00eb8e48c889c input=30b11c9e49a65150]*/ +/*[clinic end generated code: output=2c28c83a27884e08 input=30b11c9e49a65150]*/ { return codec_tuple(_PyUnicode_AsLatin1String(str, errors), PyUnicode_GET_LENGTH(str)); @@ -912,9 +912,9 @@ _codecs.ascii_encode [clinic start generated code]*/ static PyObject * -_codecs_ascii_encode_impl(PyModuleDef *module, PyObject *str, +_codecs_ascii_encode_impl(PyObject *module, PyObject *str, const char *errors) -/*[clinic end generated code: output=a9d18fc6b6b91cfb input=843a1d268e6dfa8e]*/ +/*[clinic end generated code: output=b5e035182d33befc input=843a1d268e6dfa8e]*/ { return codec_tuple(_PyUnicode_AsASCIIString(str, errors), PyUnicode_GET_LENGTH(str)); @@ -929,9 +929,9 @@ _codecs.charmap_encode [clinic start generated code]*/ static PyObject * -_codecs_charmap_encode_impl(PyModuleDef *module, PyObject *str, +_codecs_charmap_encode_impl(PyObject *module, PyObject *str, const char *errors, PyObject *mapping) -/*[clinic end generated code: output=14ca42b83853c643 input=0752cde07a6d6d00]*/ +/*[clinic end generated code: output=047476f48495a9e9 input=0752cde07a6d6d00]*/ { if (mapping == Py_None) mapping = NULL; @@ -947,8 +947,8 @@ _codecs.charmap_build [clinic start generated code]*/ static PyObject * -_codecs_charmap_build_impl(PyModuleDef *module, PyObject *map) -/*[clinic end generated code: output=9485b58fa44afa6a input=d91a91d1717dbc6d]*/ +_codecs_charmap_build_impl(PyObject *module, PyObject *map) +/*[clinic end generated code: output=bb073c27031db9ac input=d91a91d1717dbc6d]*/ { return PyUnicode_BuildEncodingMap(map); } @@ -963,9 +963,8 @@ _codecs.mbcs_encode [clinic start generated code]*/ static PyObject * -_codecs_mbcs_encode_impl(PyModuleDef *module, PyObject *str, - const char *errors) -/*[clinic end generated code: output=d1a013bc68798bd7 input=de471e0815947553]*/ +_codecs_mbcs_encode_impl(PyObject *module, PyObject *str, const char *errors) +/*[clinic end generated code: output=76e2e170c966c080 input=de471e0815947553]*/ { return codec_tuple(PyUnicode_EncodeCodePage(CP_ACP, str, errors), PyUnicode_GET_LENGTH(str)); @@ -980,9 +979,9 @@ _codecs.code_page_encode [clinic start generated code]*/ static PyObject * -_codecs_code_page_encode_impl(PyModuleDef *module, int code_page, - PyObject *str, const char *errors) -/*[clinic end generated code: output=3b406618dbfbce25 input=786421ae617d680b]*/ +_codecs_code_page_encode_impl(PyObject *module, int code_page, PyObject *str, + const char *errors) +/*[clinic end generated code: output=45673f6085657a9e input=786421ae617d680b]*/ { return codec_tuple(PyUnicode_EncodeCodePage(code_page, str, errors), PyUnicode_GET_LENGTH(str)); @@ -1006,9 +1005,9 @@ error and must return a (replacement, new position) tuple. [clinic start generated code]*/ static PyObject * -_codecs_register_error_impl(PyModuleDef *module, const char *errors, +_codecs_register_error_impl(PyObject *module, const char *errors, PyObject *handler) -/*[clinic end generated code: output=be00d3b1849ce68a input=5e6709203c2e33fe]*/ +/*[clinic end generated code: output=fa2f7d1879b3067d input=5e6709203c2e33fe]*/ { if (PyCodec_RegisterError(errors, handler)) return NULL; @@ -1027,8 +1026,8 @@ LookupError, if no handler exists under this name. [clinic start generated code]*/ static PyObject * -_codecs_lookup_error_impl(PyModuleDef *module, const char *name) -/*[clinic end generated code: output=731e6df8c83c6158 input=4775dd65e6235aba]*/ +_codecs_lookup_error_impl(PyObject *module, const char *name) +/*[clinic end generated code: output=087f05dc0c9a98cc input=4775dd65e6235aba]*/ { return PyCodec_LookupError(name); } |