mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03: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
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]*/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue