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:
Victor Stinner 2023-06-02 01:31:58 +02:00 committed by GitHub
parent 146939306a
commit cbb9ba844f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
35 changed files with 37 additions and 321 deletions

View file

@ -216,9 +216,6 @@ builtin_format(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
_PyArg_BadArgument("format", "argument 2", "str", args[1]);
goto exit;
}
if (PyUnicode_READY(args[1]) == -1) {
goto exit;
}
format_spec = args[1];
skip_optional:
return_value = builtin_format_impl(module, value, format_spec);
@ -1409,4 +1406,4 @@ builtin_issubclass(PyObject *module, PyObject *const *args, Py_ssize_t nargs)
exit:
return return_value;
}
/*[clinic end generated code: output=84a04e7446debf58 input=a9049054013a1b77]*/
/*[clinic end generated code: output=ef2f16ece134d62d input=a9049054013a1b77]*/