summaryrefslogtreecommitdiff
path: root/win32/win32.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-04-05 23:51:27 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-04-05 23:51:27 +0000
commitac4e60bfb205fd90f9cf05bd73df2c0fe45c01ad (patch)
tree2e9bfcd192fe4a564ec72f8db81226ad9cd52b90 /win32/win32.c
parentcce3aa754b9c69741f664b517cbbf97a6397960b (diff)
win32.c: wchar conversion
* win32/win32.c (rb_w32_wstr_to_mbstr, rb_w32_mbstr_to_wstr): make WCHAR/mb conversion functions public. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45521 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'win32/win32.c')
-rw-r--r--win32/win32.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/win32/win32.c b/win32/win32.c
index 98e4200..3051a97 100644
--- a/win32/win32.c
+++ b/win32/win32.c
@@ -1197,8 +1197,8 @@ is_batch(const char *cmd)
}
static UINT filecp(void);
-static WCHAR *mbstr_to_wstr(UINT, const char *, int, long *);
-static char *wstr_to_mbstr(UINT, const WCHAR *, int, long *);
+#define mbstr_to_wstr rb_w32_mbstr_to_wstr
+#define wstr_to_mbstr rb_w32_wstr_to_mbstr
#define acp_to_wstr(str, plen) mbstr_to_wstr(CP_ACP, str, -1, plen)
#define wstr_to_acp(str, plen) wstr_to_mbstr(CP_ACP, str, -1, plen)
#define filecp_to_wstr(str, plen) mbstr_to_wstr(filecp(), str, -1, plen)
@@ -1952,8 +1952,8 @@ filecp(void)
}
/* License: Ruby's */
-static char *
-wstr_to_mbstr(UINT cp, const WCHAR *wstr, int clen, long *plen)
+char *
+rb_w32_wstr_to_mbstr(UINT cp, const WCHAR *wstr, int clen, long *plen)
{
char *ptr;
int len = WideCharToMultiByte(cp, 0, wstr, clen, NULL, 0, NULL, NULL);
@@ -1968,8 +1968,8 @@ wstr_to_mbstr(UINT cp, const WCHAR *wstr, int clen, long *plen)
}
/* License: Ruby's */
-static WCHAR *
-mbstr_to_wstr(UINT cp, const char *str, int clen, long *plen)
+WCHAR *
+rb_w32_mbstr_to_wstr(UINT cp, const char *str, int clen, long *plen)
{
WCHAR *ptr;
int len = MultiByteToWideChar(cp, 0, str, clen, NULL, 0);