(Try to) fix mixture of `int` and `size_t` in conversion.
This only effects VC.
MODIFY
include/mruby.h
include/mruby.h
@@ -952,8 +952,8 @@ MRB_API mrb_value mrb_str_new_static(mrb_state *mrb, const char *p, size_t len);
#define mrb_str_new_lit(mrb, lit) mrb_str_new_static(mrb, (lit), mrb_strlen_lit(lit))
#ifdef _WIN32
-char* mrb_utf8_from_locale(const char *p, size_t len);
-char* mrb_locale_from_utf8(const char *p, size_t len);
+char* mrb_utf8_from_locale(const char *p, int len);
+char* mrb_locale_from_utf8(const char *p, int len);
#define mrb_locale_free(p) free(p)
#define mrb_utf8_free(p) free(p)
#else

MODIFY
src/string.c
src/string.c
@@ -577,11 +577,11 @@ mrb_str_strlen(mrb_state *mrb, struct RString *s)
#include <windows.h>
char*
-mrb_utf8_from_locale(const char *str, size_t len)
+mrb_utf8_from_locale(const char *str, int len)
{
wchar_t* wcsp;
char* mbsp;
- size_t mbssize, wcssize;
+ int mbssize, wcssize;
if (len == 0)
return strdup("");
@@ -607,11 +607,11 @@ mrb_utf8_from_locale(const char *str, size_t len)
}
char*
-mrb_locale_from_utf8(const char *utf8, size_t len)
+mrb_locale_from_utf8(const char *utf8, int len)
{
wchar_t* wcsp;
char* mbsp;
- size_t mbssize, wcssize;
+ int mbssize, wcssize;
if (len == 0)
return strdup("");

(Try to) fix mixture of `int` and `size_t` in UTF-8 conversion.

This only effects VC.