mirror of
https://github.com/python/cpython.git
synced 2026-01-06 15:32:22 +00:00
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).
This commit is contained in:
parent
146939306a
commit
cbb9ba844f
35 changed files with 37 additions and 321 deletions
5
Modules/_io/clinic/_iomodule.c.h
generated
5
Modules/_io/clinic/_iomodule.c.h
generated
|
|
@ -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]*/
|
||||
|
|
|
|||
5
Modules/_io/clinic/textio.c.h
generated
5
Modules/_io/clinic/textio.c.h
generated
|
|
@ -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]*/
|
||||
|
|
|
|||
8
Modules/_multiprocessing/clinic/posixshmem.c.h
generated
8
Modules/_multiprocessing/clinic/posixshmem.c.h
generated
|
|
@ -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]*/
|
||||
|
|
|
|||
8
Modules/_sqlite/clinic/connection.c.h
generated
8
Modules/_sqlite/clinic/connection.c.h
generated
|
|
@ -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]*/
|
||||
|
|
|
|||
8
Modules/_sqlite/clinic/cursor.c.h
generated
8
Modules/_sqlite/clinic/cursor.c.h
generated
|
|
@ -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]*/
|
||||
|
|
|
|||
5
Modules/_sqlite/clinic/module.c.h
generated
5
Modules/_sqlite/clinic/module.c.h
generated
|
|
@ -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]*/
|
||||
|
|
|
|||
53
Modules/clinic/_codecsmodule.c.h
generated
53
Modules/clinic/_codecsmodule.c.h
generated
|
|
@ -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]*/
|
||||
|
|
|
|||
11
Modules/clinic/_localemodule.c.h
generated
11
Modules/clinic/_localemodule.c.h
generated
|
|
@ -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]*/
|
||||
|
|
|
|||
8
Modules/clinic/_testclinic.c.h
generated
8
Modules/clinic/_testclinic.c.h
generated
|
|
@ -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]*/
|
||||
|
|
|
|||
8
Modules/clinic/arraymodule.c.h
generated
8
Modules/clinic/arraymodule.c.h
generated
|
|
@ -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]*/
|
||||
|
|
|
|||
5
Modules/clinic/grpmodule.c.h
generated
5
Modules/clinic/grpmodule.c.h
generated
|
|
@ -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]*/
|
||||
|
|
|
|||
11
Modules/clinic/posixmodule.c.h
generated
11
Modules/clinic/posixmodule.c.h
generated
|
|
@ -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]*/
|
||||
|
|
|
|||
5
Modules/clinic/pwdmodule.c.h
generated
5
Modules/clinic/pwdmodule.c.h
generated
|
|
@ -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]*/
|
||||
|
|
|
|||
5
Modules/clinic/readline.c.h
generated
5
Modules/clinic/readline.c.h
generated
|
|
@ -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]*/
|
||||
|
|
|
|||
5
Modules/clinic/syslogmodule.c.h
generated
5
Modules/clinic/syslogmodule.c.h
generated
|
|
@ -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]*/
|
||||
|
|
|
|||
44
Modules/clinic/unicodedata.c.h
generated
44
Modules/clinic/unicodedata.c.h
generated
|
|
@ -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]*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue