diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2021-01-31 15:55:13 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-31 15:55:13 +0200 |
commit | 42b1806af90b86ec393ca7da14e99ce95ec6c53b (patch) | |
tree | 8207a42275dde575bd529a07304ccda2370de2d4 | |
parent | Doc: errors tutorial improvements (GH-16269) (diff) | |
download | cpython-42b1806af90b86ec393ca7da14e99ce95ec6c53b.tar.gz cpython-42b1806af90b86ec393ca7da14e99ce95ec6c53b.tar.bz2 cpython-42b1806af90b86ec393ca7da14e99ce95ec6c53b.zip |
bpo-43030: Fixed a compiler warning in Py_UNICODE_ISSPACE with signed wchar_t (GH-24350)
-rw-r--r-- | Include/cpython/unicodeobject.h | 2 | ||||
-rw-r--r-- | Misc/NEWS.d/next/C API/2021-01-27-10-27-47.bpo-43030.loDcD_.rst | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/Include/cpython/unicodeobject.h b/Include/cpython/unicodeobject.h index f1b44554e30..a4057fd2a13 100644 --- a/Include/cpython/unicodeobject.h +++ b/Include/cpython/unicodeobject.h @@ -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) diff --git a/Misc/NEWS.d/next/C API/2021-01-27-10-27-47.bpo-43030.loDcD_.rst b/Misc/NEWS.d/next/C API/2021-01-27-10-27-47.bpo-43030.loDcD_.rst new file mode 100644 index 00000000000..7a432522db8 --- /dev/null +++ b/Misc/NEWS.d/next/C API/2021-01-27-10-27-47.bpo-43030.loDcD_.rst @@ -0,0 +1,2 @@ +Fixed a compiler warning in :c:func:`Py_UNICODE_ISSPACE()` on platforms with +signed ``wchar_t``. |