bpo-43030: Fixed a compiler warning in Py_UNICODE_ISSPACE with signed wchar_t (GH-24350)

This commit is contained in:
Serhiy Storchaka 2021-01-31 15:55:13 +02:00 committed by GitHub
parent 89294e30ff
commit 42b1806af9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 1 deletions

View file

@ -22,7 +22,7 @@
*/
#define Py_UNICODE_ISSPACE(ch) \
((ch) < 128U ? _Py_ascii_whitespace[(ch)] : _PyUnicode_IsWhitespace(ch))
((Py_UCS4)(ch) < 128U ? _Py_ascii_whitespace[(ch)] : _PyUnicode_IsWhitespace(ch))
#define Py_UNICODE_ISLOWER(ch) _PyUnicode_IsLowercase(ch)
#define Py_UNICODE_ISUPPER(ch) _PyUnicode_IsUppercase(ch)

View file

@ -0,0 +1,2 @@
Fixed a compiler warning in :c:func:`Py_UNICODE_ISSPACE()` on platforms with
signed ``wchar_t``.