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

@ -65,9 +65,6 @@ complex___format__(PyComplexObject *self, PyObject *arg)
_PyArg_BadArgument("__format__", "argument", "str", arg);
goto exit;
}
if (PyUnicode_READY(arg) == -1) {
goto exit;
}
format_spec = arg;
return_value = complex___format___impl(self, format_spec);
@ -160,4 +157,4 @@ skip_optional_pos:
exit:
return return_value;
}
/*[clinic end generated code: output=52e85a1e258425d6 input=a9049054013a1b77]*/
/*[clinic end generated code: output=d438b7ed87f8459e input=a9049054013a1b77]*/