]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-43030: Fixed a compiler warning in Py_UNICODE_ISSPACE with signed wchar_t (GH...
authorSerhiy Storchaka <storchaka@gmail.com>
Sun, 31 Jan 2021 13:55:13 +0000 (15:55 +0200)
committerGitHub <noreply@github.com>
Sun, 31 Jan 2021 13:55:13 +0000 (15:55 +0200)
Include/cpython/unicodeobject.h
Misc/NEWS.d/next/C API/2021-01-27-10-27-47.bpo-43030.loDcD_.rst [new file with mode: 0644]

index f1b44554e3078d3d67defd1337952ed6ce8a25e4..a4057fd2a13edb6ddc700066313584ae199884cd 100644 (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)
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 (file)
index 0000000..7a43252
--- /dev/null
@@ -0,0 +1,2 @@
+Fixed a compiler warning in :c:func:`Py_UNICODE_ISSPACE()` on platforms with
+signed ``wchar_t``.