diff options
author | Victor Stinner <vstinner@python.org> | 2023-06-01 23:31:58 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-01 23:31:58 (GMT) |
commit | cbb9ba844f15f2b8127028e6dfd4681b2cb2376f (patch) | |
tree | e80117a8aa3fd5a6e2d13a3295a9d908c6cc5fa5 /Modules | |
parent | 146939306adcff706ebddb047f7470d148125cdf (diff) | |
download | cpython-cbb9ba844f15f2b8127028e6dfd4681b2cb2376f.zip cpython-cbb9ba844f15f2b8127028e6dfd4681b2cb2376f.tar.gz cpython-cbb9ba844f15f2b8127028e6dfd4681b2cb2376f.tar.bz2 |
gh-92536: Argument Clinic no longer emits PyUnicode_READY() (#105208)
Since Python 3.12, PyUnicode_READY() does nothing and always
returns 0.
Argument Clinic now also checks for .cpp files (PC/_wmimodule.cpp).
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/_io/clinic/_iomodule.c.h | 5 | ||||
-rw-r--r-- | Modules/_io/clinic/textio.c.h | 5 | ||||
-rw-r--r-- | Modules/_multiprocessing/clinic/posixshmem.c.h | 8 | ||||
-rw-r--r-- | Modules/_sqlite/clinic/connection.c.h | 8 | ||||
-rw-r--r-- | Modules/_sqlite/clinic/cursor.c.h | 8 | ||||
-rw-r--r-- | Modules/_sqlite/clinic/module.c.h | 5 | ||||
-rw-r--r-- | Modules/clinic/_codecsmodule.c.h | 53 | ||||
-rw-r--r-- | Modules/clinic/_localemodule.c.h | 11 | ||||
-rw-r--r-- | Modules/clinic/_testclinic.c.h | 8 | ||||
-rw-r--r-- | Modules/clinic/arraymodule.c.h | 8 | ||||
-rw-r--r-- | Modules/clinic/grpmodule.c.h | 5 | ||||
-rw-r--r-- | Modules/clinic/posixmodule.c.h | 11 | ||||
-rw-r--r-- | Modules/clinic/pwdmodule.c.h | 5 | ||||
-rw-r--r-- | Modules/clinic/readline.c.h | 5 | ||||
-rw-r--r-- | Modules/clinic/syslogmodule.c.h | 5 | ||||
-rw-r--r-- | Modules/clinic/unicodedata.c.h | 44 |
16 files changed, 16 insertions, 178 deletions
diff --git a/Modules/_io/clinic/_iomodule.c.h b/Modules/_io/clinic/_iomodule.c.h index 4d76e33..6bb2f7f 100644 --- a/Modules/_io/clinic/_iomodule.c.h +++ b/Modules/_io/clinic/_iomodule.c.h @@ -398,13 +398,10 @@ _io_open_code(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObjec _PyArg_BadArgument("open_code", "argument 'path'", "str", args[0]); goto exit; } - if (PyUnicode_READY(args[0]) == -1) { - goto exit; - } path = args[0]; return_value = _io_open_code_impl(module, path); exit: return return_value; } -/*[clinic end generated code: output=f387eba3f4c0254a input=a9049054013a1b77]*/ +/*[clinic end generated code: output=6800c35366b1a5f3 input=a9049054013a1b77]*/ diff --git a/Modules/_io/clinic/textio.c.h b/Modules/_io/clinic/textio.c.h index 33fc23b..5c21625 100644 --- a/Modules/_io/clinic/textio.c.h +++ b/Modules/_io/clinic/textio.c.h @@ -673,9 +673,6 @@ _io_TextIOWrapper_write(textio *self, PyObject *arg) _PyArg_BadArgument("write", "argument", "str", arg); goto exit; } - if (PyUnicode_READY(arg) == -1) { - goto exit; - } text = arg; return_value = _io_TextIOWrapper_write_impl(self, text); @@ -960,4 +957,4 @@ _io_TextIOWrapper_close(textio *self, PyObject *Py_UNUSED(ignored)) { return _io_TextIOWrapper_close_impl(self); } -/*[clinic end generated code: output=42f592331302973f input=a9049054013a1b77]*/ +/*[clinic end generated code: output=e1060638b65e8a63 input=a9049054013a1b77]*/ diff --git a/Modules/_multiprocessing/clinic/posixshmem.c.h b/Modules/_multiprocessing/clinic/posixshmem.c.h index df2aa29..dd40662 100644 --- a/Modules/_multiprocessing/clinic/posixshmem.c.h +++ b/Modules/_multiprocessing/clinic/posixshmem.c.h @@ -67,9 +67,6 @@ _posixshmem_shm_open(PyObject *module, PyObject *const *args, Py_ssize_t nargs, _PyArg_BadArgument("shm_open", "argument 'path'", "str", args[0]); goto exit; } - if (PyUnicode_READY(args[0]) == -1) { - goto exit; - } path = args[0]; flags = _PyLong_AsInt(args[1]); if (flags == -1 && PyErr_Occurred()) { @@ -153,9 +150,6 @@ _posixshmem_shm_unlink(PyObject *module, PyObject *const *args, Py_ssize_t nargs _PyArg_BadArgument("shm_unlink", "argument 'path'", "str", args[0]); goto exit; } - if (PyUnicode_READY(args[0]) == -1) { - goto exit; - } path = args[0]; return_value = _posixshmem_shm_unlink_impl(module, path); @@ -172,4 +166,4 @@ exit: #ifndef _POSIXSHMEM_SHM_UNLINK_METHODDEF #define _POSIXSHMEM_SHM_UNLINK_METHODDEF #endif /* !defined(_POSIXSHMEM_SHM_UNLINK_METHODDEF) */ -/*[clinic end generated code: output=3f6fee283d5fd0e9 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=9b67f98885757bc4 input=a9049054013a1b77]*/ diff --git a/Modules/_sqlite/clinic/connection.c.h b/Modules/_sqlite/clinic/connection.c.h index 417abcc..e869d7d 100644 --- a/Modules/_sqlite/clinic/connection.c.h +++ b/Modules/_sqlite/clinic/connection.c.h @@ -966,9 +966,6 @@ pysqlite_connection_execute(pysqlite_Connection *self, PyObject *const *args, Py _PyArg_BadArgument("execute", "argument 1", "str", args[0]); goto exit; } - if (PyUnicode_READY(args[0]) == -1) { - goto exit; - } sql = args[0]; if (nargs < 2) { goto skip_optional; @@ -1008,9 +1005,6 @@ pysqlite_connection_executemany(pysqlite_Connection *self, PyObject *const *args _PyArg_BadArgument("executemany", "argument 1", "str", args[0]); goto exit; } - if (PyUnicode_READY(args[0]) == -1) { - goto exit; - } sql = args[0]; parameters = args[1]; return_value = pysqlite_connection_executemany_impl(self, sql, parameters); @@ -1665,4 +1659,4 @@ exit: #ifndef DESERIALIZE_METHODDEF #define DESERIALIZE_METHODDEF #endif /* !defined(DESERIALIZE_METHODDEF) */ -/*[clinic end generated code: output=834a99827555bf1a input=a9049054013a1b77]*/ +/*[clinic end generated code: output=d3c6cb9326736ea5 input=a9049054013a1b77]*/ diff --git a/Modules/_sqlite/clinic/cursor.c.h b/Modules/_sqlite/clinic/cursor.c.h index 43e912d..08b6a73 100644 --- a/Modules/_sqlite/clinic/cursor.c.h +++ b/Modules/_sqlite/clinic/cursor.c.h @@ -65,9 +65,6 @@ pysqlite_cursor_execute(pysqlite_Cursor *self, PyObject *const *args, Py_ssize_t _PyArg_BadArgument("execute", "argument 1", "str", args[0]); goto exit; } - if (PyUnicode_READY(args[0]) == -1) { - goto exit; - } sql = args[0]; if (nargs < 2) { goto skip_optional; @@ -107,9 +104,6 @@ pysqlite_cursor_executemany(pysqlite_Cursor *self, PyObject *const *args, Py_ssi _PyArg_BadArgument("executemany", "argument 1", "str", args[0]); goto exit; } - if (PyUnicode_READY(args[0]) == -1) { - goto exit; - } sql = args[0]; seq_of_parameters = args[1]; return_value = pysqlite_cursor_executemany_impl(self, sql, seq_of_parameters); @@ -319,4 +313,4 @@ pysqlite_cursor_close(pysqlite_Cursor *self, PyObject *Py_UNUSED(ignored)) { return pysqlite_cursor_close_impl(self); } -/*[clinic end generated code: output=1f82e3c9791bb9a5 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=831f7bc5256526d3 input=a9049054013a1b77]*/ diff --git a/Modules/_sqlite/clinic/module.c.h b/Modules/_sqlite/clinic/module.c.h index 12f6083..94002b0 100644 --- a/Modules/_sqlite/clinic/module.c.h +++ b/Modules/_sqlite/clinic/module.c.h @@ -133,9 +133,6 @@ pysqlite_register_converter(PyObject *module, PyObject *const *args, Py_ssize_t _PyArg_BadArgument("register_converter", "argument 1", "str", args[0]); goto exit; } - if (PyUnicode_READY(args[0]) == -1) { - goto exit; - } orig_name = args[0]; callable = args[1]; return_value = pysqlite_register_converter_impl(module, orig_name, callable); @@ -211,4 +208,4 @@ skip_optional: exit: return return_value; } -/*[clinic end generated code: output=39d38c6cfc455042 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=e08e6856ae546e7b input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_codecsmodule.c.h b/Modules/clinic/_codecsmodule.c.h index f11bcc8..2275b6b 100644 --- a/Modules/clinic/_codecsmodule.c.h +++ b/Modules/clinic/_codecsmodule.c.h @@ -1790,9 +1790,6 @@ _codecs_utf_7_encode(PyObject *module, PyObject *const *args, Py_ssize_t nargs) _PyArg_BadArgument("utf_7_encode", "argument 1", "str", args[0]); goto exit; } - if (PyUnicode_READY(args[0]) == -1) { - goto exit; - } str = args[0]; if (nargs < 2) { goto skip_optional; @@ -1848,9 +1845,6 @@ _codecs_utf_8_encode(PyObject *module, PyObject *const *args, Py_ssize_t nargs) _PyArg_BadArgument("utf_8_encode", "argument 1", "str", args[0]); goto exit; } - if (PyUnicode_READY(args[0]) == -1) { - goto exit; - } str = args[0]; if (nargs < 2) { goto skip_optional; @@ -1907,9 +1901,6 @@ _codecs_utf_16_encode(PyObject *module, PyObject *const *args, Py_ssize_t nargs) _PyArg_BadArgument("utf_16_encode", "argument 1", "str", args[0]); goto exit; } - if (PyUnicode_READY(args[0]) == -1) { - goto exit; - } str = args[0]; if (nargs < 2) { goto skip_optional; @@ -1972,9 +1963,6 @@ _codecs_utf_16_le_encode(PyObject *module, PyObject *const *args, Py_ssize_t nar _PyArg_BadArgument("utf_16_le_encode", "argument 1", "str", args[0]); goto exit; } - if (PyUnicode_READY(args[0]) == -1) { - goto exit; - } str = args[0]; if (nargs < 2) { goto skip_optional; @@ -2030,9 +2018,6 @@ _codecs_utf_16_be_encode(PyObject *module, PyObject *const *args, Py_ssize_t nar _PyArg_BadArgument("utf_16_be_encode", "argument 1", "str", args[0]); goto exit; } - if (PyUnicode_READY(args[0]) == -1) { - goto exit; - } str = args[0]; if (nargs < 2) { goto skip_optional; @@ -2089,9 +2074,6 @@ _codecs_utf_32_encode(PyObject *module, PyObject *const *args, Py_ssize_t nargs) _PyArg_BadArgument("utf_32_encode", "argument 1", "str", args[0]); goto exit; } - if (PyUnicode_READY(args[0]) == -1) { - goto exit; - } str = args[0]; if (nargs < 2) { goto skip_optional; @@ -2154,9 +2136,6 @@ _codecs_utf_32_le_encode(PyObject *module, PyObject *const *args, Py_ssize_t nar _PyArg_BadArgument("utf_32_le_encode", "argument 1", "str", args[0]); goto exit; } - if (PyUnicode_READY(args[0]) == -1) { - goto exit; - } str = args[0]; if (nargs < 2) { goto skip_optional; @@ -2212,9 +2191,6 @@ _codecs_utf_32_be_encode(PyObject *module, PyObject *const *args, Py_ssize_t nar _PyArg_BadArgument("utf_32_be_encode", "argument 1", "str", args[0]); goto exit; } - if (PyUnicode_READY(args[0]) == -1) { - goto exit; - } str = args[0]; if (nargs < 2) { goto skip_optional; @@ -2270,9 +2246,6 @@ _codecs_unicode_escape_encode(PyObject *module, PyObject *const *args, Py_ssize_ _PyArg_BadArgument("unicode_escape_encode", "argument 1", "str", args[0]); goto exit; } - if (PyUnicode_READY(args[0]) == -1) { - goto exit; - } str = args[0]; if (nargs < 2) { goto skip_optional; @@ -2328,9 +2301,6 @@ _codecs_raw_unicode_escape_encode(PyObject *module, PyObject *const *args, Py_ss _PyArg_BadArgument("raw_unicode_escape_encode", "argument 1", "str", args[0]); goto exit; } - if (PyUnicode_READY(args[0]) == -1) { - goto exit; - } str = args[0]; if (nargs < 2) { goto skip_optional; @@ -2386,9 +2356,6 @@ _codecs_latin_1_encode(PyObject *module, PyObject *const *args, Py_ssize_t nargs _PyArg_BadArgument("latin_1_encode", "argument 1", "str", args[0]); goto exit; } - if (PyUnicode_READY(args[0]) == -1) { - goto exit; - } str = args[0]; if (nargs < 2) { goto skip_optional; @@ -2444,9 +2411,6 @@ _codecs_ascii_encode(PyObject *module, PyObject *const *args, Py_ssize_t nargs) _PyArg_BadArgument("ascii_encode", "argument 1", "str", args[0]); goto exit; } - if (PyUnicode_READY(args[0]) == -1) { - goto exit; - } str = args[0]; if (nargs < 2) { goto skip_optional; @@ -2503,9 +2467,6 @@ _codecs_charmap_encode(PyObject *module, PyObject *const *args, Py_ssize_t nargs _PyArg_BadArgument("charmap_encode", "argument 1", "str", args[0]); goto exit; } - if (PyUnicode_READY(args[0]) == -1) { - goto exit; - } str = args[0]; if (nargs < 2) { goto skip_optional; @@ -2560,9 +2521,6 @@ _codecs_charmap_build(PyObject *module, PyObject *arg) _PyArg_BadArgument("charmap_build", "argument", "str", arg); goto exit; } - if (PyUnicode_READY(arg) == -1) { - goto exit; - } map = arg; return_value = _codecs_charmap_build_impl(module, map); @@ -2597,9 +2555,6 @@ _codecs_mbcs_encode(PyObject *module, PyObject *const *args, Py_ssize_t nargs) _PyArg_BadArgument("mbcs_encode", "argument 1", "str", args[0]); goto exit; } - if (PyUnicode_READY(args[0]) == -1) { - goto exit; - } str = args[0]; if (nargs < 2) { goto skip_optional; @@ -2658,9 +2613,6 @@ _codecs_oem_encode(PyObject *module, PyObject *const *args, Py_ssize_t nargs) _PyArg_BadArgument("oem_encode", "argument 1", "str", args[0]); goto exit; } - if (PyUnicode_READY(args[0]) == -1) { - goto exit; - } str = args[0]; if (nargs < 2) { goto skip_optional; @@ -2725,9 +2677,6 @@ _codecs_code_page_encode(PyObject *module, PyObject *const *args, Py_ssize_t nar _PyArg_BadArgument("code_page_encode", "argument 2", "str", args[1]); goto exit; } - if (PyUnicode_READY(args[1]) == -1) { - goto exit; - } str = args[1]; if (nargs < 3) { goto skip_optional; @@ -2869,4 +2818,4 @@ exit: #ifndef _CODECS_CODE_PAGE_ENCODE_METHODDEF #define _CODECS_CODE_PAGE_ENCODE_METHODDEF #endif /* !defined(_CODECS_CODE_PAGE_ENCODE_METHODDEF) */ -/*[clinic end generated code: output=603da07cf8dfeb4b input=a9049054013a1b77]*/ +/*[clinic end generated code: output=0f52053d31533376 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_localemodule.c.h b/Modules/clinic/_localemodule.c.h index e6b9996..9d65c08 100644 --- a/Modules/clinic/_localemodule.c.h +++ b/Modules/clinic/_localemodule.c.h @@ -108,17 +108,11 @@ _locale_strcoll(PyObject *module, PyObject *const *args, Py_ssize_t nargs) _PyArg_BadArgument("strcoll", "argument 1", "str", args[0]); goto exit; } - if (PyUnicode_READY(args[0]) == -1) { - goto exit; - } os1 = args[0]; if (!PyUnicode_Check(args[1])) { _PyArg_BadArgument("strcoll", "argument 2", "str", args[1]); goto exit; } - if (PyUnicode_READY(args[1]) == -1) { - goto exit; - } os2 = args[1]; return_value = _locale_strcoll_impl(module, os1, os2); @@ -152,9 +146,6 @@ _locale_strxfrm(PyObject *module, PyObject *arg) _PyArg_BadArgument("strxfrm", "argument", "str", arg); goto exit; } - if (PyUnicode_READY(arg) == -1) { - goto exit; - } str = arg; return_value = _locale_strxfrm_impl(module, str); @@ -608,4 +599,4 @@ _locale_getencoding(PyObject *module, PyObject *Py_UNUSED(ignored)) #ifndef _LOCALE_BIND_TEXTDOMAIN_CODESET_METHODDEF #define _LOCALE_BIND_TEXTDOMAIN_CODESET_METHODDEF #endif /* !defined(_LOCALE_BIND_TEXTDOMAIN_CODESET_METHODDEF) */ -/*[clinic end generated code: output=406842c3441559cb input=a9049054013a1b77]*/ +/*[clinic end generated code: output=9dbd0b4bf5767edd input=a9049054013a1b77]*/ diff --git a/Modules/clinic/_testclinic.c.h b/Modules/clinic/_testclinic.c.h index cc69f5c..51c3a78 100644 --- a/Modules/clinic/_testclinic.c.h +++ b/Modules/clinic/_testclinic.c.h @@ -135,9 +135,6 @@ unicode_converter(PyObject *module, PyObject *arg) _PyArg_BadArgument("unicode_converter", "argument", "str", arg); goto exit; } - if (PyUnicode_READY(arg) == -1) { - goto exit; - } a = arg; return_value = unicode_converter_impl(module, a); @@ -648,9 +645,6 @@ int_converter(PyObject *module, PyObject *const *args, Py_ssize_t nargs) _PyArg_BadArgument("int_converter", "argument 3", "a unicode character", args[2]); goto exit; } - if (PyUnicode_READY(args[2])) { - goto exit; - } if (PyUnicode_GET_LENGTH(args[2]) != 1) { _PyArg_BadArgument("int_converter", "argument 3", "a unicode character", args[2]); goto exit; @@ -3075,4 +3069,4 @@ skip_optional_pos: exit: return return_value; } -/*[clinic end generated code: output=f58202a6e5df2d16 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=0de394419fefe7cf input=a9049054013a1b77]*/ diff --git a/Modules/clinic/arraymodule.c.h b/Modules/clinic/arraymodule.c.h index e68c392..6009318 100644 --- a/Modules/clinic/arraymodule.c.h +++ b/Modules/clinic/arraymodule.c.h @@ -504,9 +504,6 @@ array_array_fromunicode(arrayobject *self, PyObject *arg) _PyArg_BadArgument("fromunicode", "argument", "str", arg); goto exit; } - if (PyUnicode_READY(arg) == -1) { - goto exit; - } ustr = arg; return_value = array_array_fromunicode_impl(self, ustr); @@ -587,9 +584,6 @@ array__array_reconstructor(PyObject *module, PyObject *const *args, Py_ssize_t n _PyArg_BadArgument("_array_reconstructor", "argument 2", "a unicode character", args[1]); goto exit; } - if (PyUnicode_READY(args[1])) { - goto exit; - } if (PyUnicode_GET_LENGTH(args[1]) != 1) { _PyArg_BadArgument("_array_reconstructor", "argument 2", "a unicode character", args[1]); goto exit; @@ -680,4 +674,4 @@ PyDoc_STRVAR(array_arrayiterator___setstate____doc__, #define ARRAY_ARRAYITERATOR___SETSTATE___METHODDEF \ {"__setstate__", (PyCFunction)array_arrayiterator___setstate__, METH_O, array_arrayiterator___setstate____doc__}, -/*[clinic end generated code: output=69bc1451f7bda234 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=11595e9f38d6d500 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/grpmodule.c.h b/Modules/clinic/grpmodule.c.h index 4914bc9..38de3ce 100644 --- a/Modules/clinic/grpmodule.c.h +++ b/Modules/clinic/grpmodule.c.h @@ -119,9 +119,6 @@ grp_getgrnam(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObject _PyArg_BadArgument("getgrnam", "argument 'name'", "str", args[0]); goto exit; } - if (PyUnicode_READY(args[0]) == -1) { - goto exit; - } name = args[0]; return_value = grp_getgrnam_impl(module, name); @@ -149,4 +146,4 @@ grp_getgrall(PyObject *module, PyObject *Py_UNUSED(ignored)) { return grp_getgrall_impl(module); } -/*[clinic end generated code: output=0916fdbcdeaf5d7d input=a9049054013a1b77]*/ +/*[clinic end generated code: output=e685227ed5d9be9f input=a9049054013a1b77]*/ diff --git a/Modules/clinic/posixmodule.c.h b/Modules/clinic/posixmodule.c.h index b8f0e5d..a8f6ce0 100644 --- a/Modules/clinic/posixmodule.c.h +++ b/Modules/clinic/posixmodule.c.h @@ -8282,17 +8282,11 @@ os_putenv(PyObject *module, PyObject *const *args, Py_ssize_t nargs) _PyArg_BadArgument("putenv", "argument 1", "str", args[0]); goto exit; } - if (PyUnicode_READY(args[0]) == -1) { - goto exit; - } name = args[0]; if (!PyUnicode_Check(args[1])) { _PyArg_BadArgument("putenv", "argument 2", "str", args[1]); goto exit; } - if (PyUnicode_READY(args[1]) == -1) { - goto exit; - } value = args[1]; return_value = os_putenv_impl(module, name, value); @@ -8369,9 +8363,6 @@ os_unsetenv(PyObject *module, PyObject *arg) _PyArg_BadArgument("unsetenv", "argument", "str", arg); goto exit; } - if (PyUnicode_READY(arg) == -1) { - goto exit; - } name = arg; return_value = os_unsetenv_impl(module, name); @@ -11990,4 +11981,4 @@ exit: #ifndef OS_WAITSTATUS_TO_EXITCODE_METHODDEF #define OS_WAITSTATUS_TO_EXITCODE_METHODDEF #endif /* !defined(OS_WAITSTATUS_TO_EXITCODE_METHODDEF) */ -/*[clinic end generated code: output=02bece83d20d497b input=a9049054013a1b77]*/ +/*[clinic end generated code: output=a7e8c3df2db09717 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/pwdmodule.c.h b/Modules/clinic/pwdmodule.c.h index f2603ea..748c873 100644 --- a/Modules/clinic/pwdmodule.c.h +++ b/Modules/clinic/pwdmodule.c.h @@ -43,9 +43,6 @@ pwd_getpwnam(PyObject *module, PyObject *arg) _PyArg_BadArgument("getpwnam", "argument", "str", arg); goto exit; } - if (PyUnicode_READY(arg) == -1) { - goto exit; - } name = arg; return_value = pwd_getpwnam_impl(module, name); @@ -80,4 +77,4 @@ pwd_getpwall(PyObject *module, PyObject *Py_UNUSED(ignored)) #ifndef PWD_GETPWALL_METHODDEF #define PWD_GETPWALL_METHODDEF #endif /* !defined(PWD_GETPWALL_METHODDEF) */ -/*[clinic end generated code: output=a95bc08653cda56b input=a9049054013a1b77]*/ +/*[clinic end generated code: output=1edf1e26cd2762db input=a9049054013a1b77]*/ diff --git a/Modules/clinic/readline.c.h b/Modules/clinic/readline.c.h index e36d651..83d93ef 100644 --- a/Modules/clinic/readline.c.h +++ b/Modules/clinic/readline.c.h @@ -447,9 +447,6 @@ readline_replace_history_item(PyObject *module, PyObject *const *args, Py_ssize_ _PyArg_BadArgument("replace_history_item", "argument 2", "str", args[1]); goto exit; } - if (PyUnicode_READY(args[1]) == -1) { - goto exit; - } line = args[1]; return_value = readline_replace_history_item_impl(module, entry_number, line); @@ -691,4 +688,4 @@ readline_redisplay(PyObject *module, PyObject *Py_UNUSED(ignored)) #ifndef READLINE_CLEAR_HISTORY_METHODDEF #define READLINE_CLEAR_HISTORY_METHODDEF #endif /* !defined(READLINE_CLEAR_HISTORY_METHODDEF) */ -/*[clinic end generated code: output=9097fcb749c19e27 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=d66c3df7e72f93c4 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/syslogmodule.c.h b/Modules/clinic/syslogmodule.c.h index 0ce66ad..3e0792b 100644 --- a/Modules/clinic/syslogmodule.c.h +++ b/Modules/clinic/syslogmodule.c.h @@ -69,9 +69,6 @@ syslog_openlog(PyObject *module, PyObject *const *args, Py_ssize_t nargs, PyObje _PyArg_BadArgument("openlog", "argument 'ident'", "str", args[0]); goto exit; } - if (PyUnicode_READY(args[0]) == -1) { - goto exit; - } ident = args[0]; if (!--noptargs) { goto skip_optional_pos; @@ -254,4 +251,4 @@ syslog_LOG_UPTO(PyObject *module, PyObject *arg) exit: return return_value; } -/*[clinic end generated code: output=3b1bdb16565b8fda input=a9049054013a1b77]*/ +/*[clinic end generated code: output=b8124c0977ed6177 input=a9049054013a1b77]*/ diff --git a/Modules/clinic/unicodedata.c.h b/Modules/clinic/unicodedata.c.h index 6102027..ec30f90 100644 --- a/Modules/clinic/unicodedata.c.h +++ b/Modules/clinic/unicodedata.c.h @@ -39,9 +39,6 @@ unicodedata_UCD_decimal(PyObject *self, PyObject *const *args, Py_ssize_t nargs) _PyArg_BadArgument("decimal", "argument 1", "a unicode character", args[0]); goto exit; } - if (PyUnicode_READY(args[0])) { - goto exit; - } if (PyUnicode_GET_LENGTH(args[0]) != 1) { _PyArg_BadArgument("decimal", "argument 1", "a unicode character", args[0]); goto exit; @@ -88,9 +85,6 @@ unicodedata_UCD_digit(PyObject *self, PyObject *const *args, Py_ssize_t nargs) _PyArg_BadArgument("digit", "argument 1", "a unicode character", args[0]); goto exit; } - if (PyUnicode_READY(args[0])) { - goto exit; - } if (PyUnicode_GET_LENGTH(args[0]) != 1) { _PyArg_BadArgument("digit", "argument 1", "a unicode character", args[0]); goto exit; @@ -138,9 +132,6 @@ unicodedata_UCD_numeric(PyObject *self, PyObject *const *args, Py_ssize_t nargs) _PyArg_BadArgument("numeric", "argument 1", "a unicode character", args[0]); goto exit; } - if (PyUnicode_READY(args[0])) { - goto exit; - } if (PyUnicode_GET_LENGTH(args[0]) != 1) { _PyArg_BadArgument("numeric", "argument 1", "a unicode character", args[0]); goto exit; @@ -179,9 +170,6 @@ unicodedata_UCD_category(PyObject *self, PyObject *arg) _PyArg_BadArgument("category", "argument", "a unicode character", arg); goto exit; } - if (PyUnicode_READY(arg)) { - goto exit; - } if (PyUnicode_GET_LENGTH(arg) != 1) { _PyArg_BadArgument("category", "argument", "a unicode character", arg); goto exit; @@ -217,9 +205,6 @@ unicodedata_UCD_bidirectional(PyObject *self, PyObject *arg) _PyArg_BadArgument("bidirectional", "argument", "a unicode character", arg); goto exit; } - if (PyUnicode_READY(arg)) { - goto exit; - } if (PyUnicode_GET_LENGTH(arg) != 1) { _PyArg_BadArgument("bidirectional", "argument", "a unicode character", arg); goto exit; @@ -256,9 +241,6 @@ unicodedata_UCD_combining(PyObject *self, PyObject *arg) _PyArg_BadArgument("combining", "argument", "a unicode character", arg); goto exit; } - if (PyUnicode_READY(arg)) { - goto exit; - } if (PyUnicode_GET_LENGTH(arg) != 1) { _PyArg_BadArgument("combining", "argument", "a unicode character", arg); goto exit; @@ -300,9 +282,6 @@ unicodedata_UCD_mirrored(PyObject *self, PyObject *arg) _PyArg_BadArgument("mirrored", "argument", "a unicode character", arg); goto exit; } - if (PyUnicode_READY(arg)) { - goto exit; - } if (PyUnicode_GET_LENGTH(arg) != 1) { _PyArg_BadArgument("mirrored", "argument", "a unicode character", arg); goto exit; @@ -340,9 +319,6 @@ unicodedata_UCD_east_asian_width(PyObject *self, PyObject *arg) _PyArg_BadArgument("east_asian_width", "argument", "a unicode character", arg); goto exit; } - if (PyUnicode_READY(arg)) { - goto exit; - } if (PyUnicode_GET_LENGTH(arg) != 1) { _PyArg_BadArgument("east_asian_width", "argument", "a unicode character", arg); goto exit; @@ -378,9 +354,6 @@ unicodedata_UCD_decomposition(PyObject *self, PyObject *arg) _PyArg_BadArgument("decomposition", "argument", "a unicode character", arg); goto exit; } - if (PyUnicode_READY(arg)) { - goto exit; - } if (PyUnicode_GET_LENGTH(arg) != 1) { _PyArg_BadArgument("decomposition", "argument", "a unicode character", arg); goto exit; @@ -421,17 +394,11 @@ unicodedata_UCD_is_normalized(PyObject *self, PyObject *const *args, Py_ssize_t _PyArg_BadArgument("is_normalized", "argument 1", "str", args[0]); goto exit; } - if (PyUnicode_READY(args[0]) == -1) { - goto exit; - } form = args[0]; if (!PyUnicode_Check(args[1])) { _PyArg_BadArgument("is_normalized", "argument 2", "str", args[1]); goto exit; } - if (PyUnicode_READY(args[1]) == -1) { - goto exit; - } input = args[1]; return_value = unicodedata_UCD_is_normalized_impl(self, form, input); @@ -468,17 +435,11 @@ unicodedata_UCD_normalize(PyObject *self, PyObject *const *args, Py_ssize_t narg _PyArg_BadArgument("normalize", "argument 1", "str", args[0]); goto exit; } - if (PyUnicode_READY(args[0]) == -1) { - goto exit; - } form = args[0]; if (!PyUnicode_Check(args[1])) { _PyArg_BadArgument("normalize", "argument 2", "str", args[1]); goto exit; } - if (PyUnicode_READY(args[1]) == -1) { - goto exit; - } input = args[1]; return_value = unicodedata_UCD_normalize_impl(self, form, input); @@ -515,9 +476,6 @@ unicodedata_UCD_name(PyObject *self, PyObject *const *args, Py_ssize_t nargs) _PyArg_BadArgument("name", "argument 1", "a unicode character", args[0]); goto exit; } - if (PyUnicode_READY(args[0])) { - goto exit; - } if (PyUnicode_GET_LENGTH(args[0]) != 1) { _PyArg_BadArgument("name", "argument 1", "a unicode character", args[0]); goto exit; @@ -565,4 +523,4 @@ unicodedata_UCD_lookup(PyObject *self, PyObject *arg) exit: return return_value; } -/*[clinic end generated code: output=aaf601d28b352353 input=a9049054013a1b77]*/ +/*[clinic end generated code: output=43e551ecaa985a40 input=a9049054013a1b77]*/ |