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/_io | |
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/_io')
-rw-r--r-- | Modules/_io/clinic/_iomodule.c.h | 5 | ||||
-rw-r--r-- | Modules/_io/clinic/textio.c.h | 5 |
2 files changed, 2 insertions, 8 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]*/ |