Remove remaining uses of ctype, which has locale issues.

PiperOrigin-RevId: 615981920
pull/16173/head
Mike Kruskal 9 months ago committed by Copybara-Service
parent 2ee72715e0
commit 0a6a117ed3
  1. 6
      src/google/protobuf/io/io_win32.cc

@ -28,14 +28,12 @@
#include "google/protobuf/io/io_win32.h" #include "google/protobuf/io/io_win32.h"
#include <ctype.h>
#include <direct.h> #include <direct.h>
#include <errno.h> #include <errno.h>
#include <fcntl.h> #include <fcntl.h>
#include <io.h> #include <io.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/types.h> #include <sys/types.h>
#include <wctype.h>
#include "absl/strings/ascii.h" #include "absl/strings/ascii.h"
@ -71,7 +69,9 @@ struct CharTraits<char> {
template <> template <>
struct CharTraits<wchar_t> { struct CharTraits<wchar_t> {
static bool is_alpha(wchar_t ch) { return iswalpha(ch); } static bool is_alpha(wchar_t ch) {
return (ch >= 'a' && ch <= 'z') || (ch >= 'A' && ch <= 'Z');
}
}; };
template <typename char_type> template <typename char_type>

Loading…
Cancel
Save