mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-15 09:23:44 +00:00
Update error messages for renamed functions.
runtime/mercury_string.c:
Update error messages in MR_utf8_to_wide and MR_wide_to_utf8.
This commit is contained in:
@@ -585,11 +585,11 @@ MR_utf8_to_wide(const char *s)
|
||||
|
||||
wslen = MultiByteToWideChar(CP_UTF8, 0, s, -1, NULL, 0);
|
||||
if (wslen == 0) {
|
||||
MR_fatal_error("ML_utf8_to_wide: MultiByteToWideChar failed");
|
||||
MR_fatal_error("MR_utf8_to_wide: MultiByteToWideChar failed");
|
||||
}
|
||||
ws = MR_GC_NEW_ARRAY(wchar_t, wslen);
|
||||
if (0 == MultiByteToWideChar(CP_UTF8, 0, s, -1, ws, wslen)) {
|
||||
MR_fatal_error("ML_utf8_to_wide: MultiByteToWideChar failed");
|
||||
MR_fatal_error("MR_utf8_to_wide: MultiByteToWideChar failed");
|
||||
}
|
||||
return ws;
|
||||
}
|
||||
@@ -602,11 +602,11 @@ MR_wide_to_utf8(const wchar_t *ws, MR_AllocSiteInfoPtr alloc_id)
|
||||
|
||||
bytes = WideCharToMultiByte(CP_UTF8, 0, ws, -1, NULL, 0, NULL, NULL);
|
||||
if (bytes == 0) {
|
||||
MR_fatal_error("ML_wide_to_utf8: WideCharToMultiByte failed");
|
||||
MR_fatal_error("MR_wide_to_utf8: WideCharToMultiByte failed");
|
||||
}
|
||||
MR_allocate_aligned_string_msg(s, bytes, alloc_id);
|
||||
if (0 == WideCharToMultiByte(CP_UTF8, 0, ws, -1, s, bytes, NULL, NULL)) {
|
||||
MR_fatal_error("ML_wide_to_utf8: WideCharToMultiByte failed");
|
||||
MR_fatal_error("MR_wide_to_utf8: WideCharToMultiByte failed");
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user