Index: runtime/bin/utils_android.cc |
diff --git a/runtime/bin/utils_android.cc b/runtime/bin/utils_android.cc |
index 615dae966a2bdc151852484e8cdd330f9f33b4e9..4e535eb1e730a1a978cf28df75cfe0229f533f85 100644 |
--- a/runtime/bin/utils_android.cc |
+++ b/runtime/bin/utils_android.cc |
@@ -42,38 +42,58 @@ void OSError::SetCodeAndMessage(SubSystem sub_system, int code) { |
} |
} |
-const char* StringUtils::ConsoleStringToUtf8(const char* str) { |
+const char* StringUtils::ConsoleStringToUtf8( |
+ const char* str, intptr_t len, intptr_t* result_len) { |
+ if (result_len != NULL) { |
+ *result_len = len; |
+ } |
return str; |
} |
-const char* StringUtils::Utf8ToConsoleString(const char* utf8) { |
+const char* StringUtils::Utf8ToConsoleString( |
+ const char* utf8, intptr_t len, intptr_t* result_len) { |
+ if (result_len != NULL) { |
+ *result_len = len; |
+ } |
return utf8; |
} |
-char* StringUtils::ConsoleStringToUtf8(char* str) { |
+char* StringUtils::ConsoleStringToUtf8( |
+ char* str, intptr_t len, intptr_t* result_len) { |
+ if (result_len != NULL) { |
+ *result_len = len; |
+ } |
return str; |
} |
-char* StringUtils::Utf8ToConsoleString(char* utf8) { |
+char* StringUtils::Utf8ToConsoleString( |
+ char* utf8, intptr_t len, intptr_t* result_len) { |
+ if (result_len != NULL) { |
+ *result_len = len; |
+ } |
return utf8; |
kustermann
2015/06/22 11:11:21
There is potential for issues here. Previously the
Søren Gjesse
2015/06/23 11:17:59
Changed this to be only implemented on Windows. Th
|
} |
-wchar_t* StringUtils::Utf8ToWide(char* utf8) { |
+wchar_t* StringUtils::Utf8ToWide( |
+ char* utf8, intptr_t len, intptr_t* result_len) { |
UNIMPLEMENTED(); |
return NULL; |
} |
-const wchar_t* StringUtils::Utf8ToWide(const char* utf8) { |
+const wchar_t* StringUtils::Utf8ToWide( |
+ const char* utf8, intptr_t len, intptr_t* result_len) { |
UNIMPLEMENTED(); |
return NULL; |
} |
-char* StringUtils::WideToUtf8(wchar_t* str) { |
+char* StringUtils::WideToUtf8( |
+ wchar_t* str, intptr_t len, intptr_t* result_len) { |
UNIMPLEMENTED(); |
return NULL; |
} |
-const char* StringUtils::WideToUtf8(const wchar_t* str) { |
+const char* StringUtils::WideToUtf8( |
+ const wchar_t* str, intptr_t len, intptr_t* result_len) { |
UNIMPLEMENTED(); |
return NULL; |
} |