]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-80064: Fix is_valid_wide_char() return type (#105099)
authorVictor Stinner <vstinner@python.org>
Tue, 30 May 2023 16:36:20 +0000 (18:36 +0200)
committerGitHub <noreply@github.com>
Tue, 30 May 2023 16:36:20 +0000 (18:36 +0200)
Return a classical int, rather than size_t. The size_t type was
kept from copied/pasted code related to mbstowcs().

Python/fileutils.c

index f137ee936502c1f28a1329a9eb90821ff7f172ef..f262c3e095c9ba2b9b5265dd5a658af7d3e8ad12 100644 (file)
@@ -112,7 +112,7 @@ _Py_device_encoding(int fd)
 }
 
 
-static size_t
+static int
 is_valid_wide_char(wchar_t ch)
 {
 #ifdef HAVE_NON_UNICODE_WCHAR_T_REPRESENTATION