diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2016-10-23 15:12:25 +0300 |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2016-10-23 15:12:25 +0300 |
commit | 6ed55b2d31ec9afacbecd309d2c3a4c099848a6c (patch) | |
tree | d488945aab93e056bf1cc57d48b2bcbf2a459cd2 /Modules/unicodedata.c | |
parent | 1cfcc8a48cd043984c7dc3a53052b9528be54958 (diff) | |
download | cpython-6ed55b2d31ec9afacbecd309d2c3a4c099848a6c.tar.gz |
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 9e71e018e2..fbe811e807 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. */ |