diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-10-23 12:12:25 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-10-23 12:12:25 (GMT) |
commit | f8d7d41507d8c0855b58c9be14011381d03c5cde (patch) | |
tree | 1a38be5e64aaf4c64a7581f209548818926cdb0f /Modules/unicodedata.c | |
parent | 8c9331057d0f5c75cd3e73f3f85fe237da0f9ed1 (diff) | |
download | cpython-f8d7d41507d8c0855b58c9be14011381d03c5cde.zip cpython-f8d7d41507d8c0855b58c9be14011381d03c5cde.tar.gz cpython-f8d7d41507d8c0855b58c9be14011381d03c5cde.tar.bz2 |
Issue #28511: Use the "U" format instead of "O!" in PyArg_Parse*.
Diffstat (limited to 'Modules/unicodedata.c')
-rw-r--r-- | Modules/unicodedata.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Modules/unicodedata.c b/Modules/unicodedata.c index 9e71e01..fbe811e 100644 --- a/Modules/unicodedata.c +++ b/Modules/unicodedata.c @@ -808,7 +808,7 @@ unicodedata.UCD.normalize self: self form: str - unistr as input: object(subclass_of='&PyUnicode_Type') + unistr as input: unicode / Return the normal form 'form' for the Unicode string unistr. @@ -819,11 +819,8 @@ Valid values for form are 'NFC', 'NFKC', 'NFD', and 'NFKD'. static PyObject * unicodedata_UCD_normalize_impl(PyObject *self, const char *form, PyObject *input) -/*[clinic end generated code: output=62d1f8870027efdc input=cd092e631cf11883]*/ +/*[clinic end generated code: output=62d1f8870027efdc input=1744c55f4ab79bf0]*/ { - if (PyUnicode_READY(input) == -1) - return NULL; - if (PyUnicode_GET_LENGTH(input) == 0) { /* Special case empty input strings, since resizing them later would cause internal errors. */ |