summaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
authorJean Boussier <jean.boussier@gmail.com>2022-07-13 11:54:08 +0200
committerJean Boussier <jean.boussier@gmail.com>2022-07-19 08:48:56 +0200
commitd084585f01b57727a5778f2f6723b89c6d98a9d4 (patch)
tree8358220e50e538c08a89f69544ae0fae0918bee2 /win32
parent85ea46730deff70172a9f50172f0011a7401f371 (diff)
Rename ENCINDEX_ASCII to ENCINDEX_ASCII_8BIT
Otherwise it's way too easy to confuse it with US_ASCII.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/6127
Diffstat (limited to 'win32')
-rw-r--r--win32/win32.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/win32/win32.c b/win32/win32.c
index 607603cf04..bf3d058171 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -2310,7 +2310,7 @@ rb_w32_conv_from_wchar(const WCHAR *wstr, rb_encoding *enc)
WideCharToMultiByte(CP_UTF8, 0, wstr, clen, RSTRING_PTR(src), len, NULL, NULL);
}
switch (encindex) {
- case ENCINDEX_ASCII:
+ case ENCINDEX_ASCII_8BIT:
case ENCINDEX_US_ASCII:
/* assume UTF-8 */
case ENCINDEX_UTF_8:
@@ -2402,7 +2402,7 @@ struct direct *
rb_w32_readdir(DIR *dirp, rb_encoding *enc)
{
int idx = rb_enc_to_index(enc);
- if (idx == ENCINDEX_ASCII) {
+ if (idx == ENCINDEX_ASCII_8BIT) {
const UINT cp = filecp();
return readdir_internal(dirp, win32_direct_conv, &cp);
}
@@ -7355,7 +7355,7 @@ rb_w32_write_console(uintptr_t strarg, int fd)
ECONV_INVALID_REPLACE|ECONV_UNDEF_REPLACE, Qnil);
/* fall through */
case ENCINDEX_US_ASCII:
- case ENCINDEX_ASCII:
+ case ENCINDEX_ASCII_8BIT:
/* assume UTF-8 */
case ENCINDEX_UTF_8:
ptr = wbuffer = mbstr_to_wstr(CP_UTF8, RSTRING_PTR(str), RSTRING_LEN(str), &len);