mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +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
Python/clinic/_warnings.c.h
generated
5
Python/clinic/_warnings.c.h
generated
|
|
@ -193,9 +193,6 @@ warnings_warn_explicit(PyObject *module, PyObject *const *args, Py_ssize_t nargs
|
|||
_PyArg_BadArgument("warn_explicit", "argument 'filename'", "str", args[2]);
|
||||
goto exit;
|
||||
}
|
||||
if (PyUnicode_READY(args[2]) == -1) {
|
||||
goto exit;
|
||||
}
|
||||
filename = args[2];
|
||||
lineno = _PyLong_AsInt(args[3]);
|
||||
if (lineno == -1 && PyErr_Occurred()) {
|
||||
|
|
@ -246,4 +243,4 @@ warnings_filters_mutated(PyObject *module, PyObject *Py_UNUSED(ignored))
|
|||
{
|
||||
return warnings_filters_mutated_impl(module);
|
||||
}
|
||||
/*[clinic end generated code: output=20429719d7223bdc input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=f8d67e0f75771c36 input=a9049054013a1b77]*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue