summaryrefslogtreecommitdiffhomepage
path: root/mrbgems/mruby-print
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2020-09-04 20:56:43 +0900
committerYukihiro "Matz" Matsumoto <[email protected]>2020-10-12 18:20:18 +0900
commit30424dfa7463370f2db200f49718d02d1b7a0c9b (patch)
tree7669e385a5a72081cce77fe0d1d6d61da235dd99 /mrbgems/mruby-print
parent9b8e5658ce8193a670a98dee591d13bdd02df526 (diff)
downloadmruby-30424dfa7463370f2db200f49718d02d1b7a0c9b.tar.gz
mruby-30424dfa7463370f2db200f49718d02d1b7a0c9b.zip
Restore old function names for compatibility; fix #5070
Rename new functions: - `mrb_convert_type(mrb,val,type,tname,method)` => `mrb_type_convert(mrb,val,type,tname,method)` - `mrb_check_convert_type(mrb,val,type,tname,method)` => `mrb_type_convert_check(mrb,val,type,tname,method)` Old names are defined by macros (support `tname` drop and `char*` => `mrb_sym` conversion).
Diffstat (limited to 'mrbgems/mruby-print')
-rw-r--r--mrbgems/mruby-print/src/print.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mrbgems/mruby-print/src/print.c b/mrbgems/mruby-print/src/print.c
index 665f2a926..9dfdde346 100644
--- a/mrbgems/mruby-print/src/print.c
+++ b/mrbgems/mruby-print/src/print.c
@@ -24,7 +24,7 @@ printstr(mrb_state *mrb, const char *p, mrb_int len)
DWORD written;
int wlen = MultiByteToWideChar(CP_UTF8, 0, p, (int)len, NULL, 0);
wchar_t* utf16 = (wchar_t*)mrb_malloc(mrb, (wlen+1) * sizeof(wchar_t));
- if (MultiByteToWideChar(CP_UTF8, 0, p, len, utf16, wlen) > 0) {
+ if (MultiByteToWideChar(CP_UTF8, 0, p, (int)len, utf16, wlen) > 0) {
utf16[wlen] = 0;
WriteConsoleW(GetStdHandle(STD_OUTPUT_HANDLE),
utf16, (DWORD)wlen, &written, NULL);