8000 bpo-43030: Fixed a compiler warning in Py_UNICODE_ISSPACE with signed… · python/cpython@229ef39 · GitHub
[go: up one dir, main page]

Skip to content

Commit 229ef39

Browse files
bpo-43030: Fixed a compiler warning in Py_UNICODE_ISSPACE with signed wchar_t (GH-24350) (GH-24397)
(cherry picked from commit 42b1806) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
1 parent de76ce5 commit 229ef39

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

Include/cpython/unicodeobject.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ extern "C" {
2222
2323
*/
2424
#define Py_UNICODE_ISSPACE(ch) \
25-
((ch) < 128U ? _Py_ascii_whitespace[(ch)] : _PyUnicode_IsWhitespace(ch))
25+
((Py_UCS4)(ch) < 128U ? _Py_ascii_whitespace[(ch)] : _PyUnicode_IsWhitespace(ch))
2626

2727
#define Py_UNICODE_ISLOWER(ch) _PyUnicode_IsLowercase(ch)
2828
#define Py_UNICODE_ISUPPER(ch) _PyUnicode_IsUppercase(ch)
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Fixed a compiler warning in :c:func:`Py_UNICODE_ISSPACE()` on platforms with
2+
signed ``wchar_t``.

0 commit comments

Comments
 (0)
0