提交 d1363d73 编写于 作者: T tbell

Merge

......@@ -43,3 +43,4 @@ a50217eb3ee10b9f9547e0708e5c9625405083ef jdk7-b64
bd31b30a5b21f20e42965b1633f18a5c7946d398 jdk7-b66
a952aafd5181af953b0ef3010dbd2fcc28460e8a jdk7-b67
b23d905cb5d3b382295240d28ab0bfb266b4503c jdk7-b68
226b20019b1f020c09ea97d137d98e011ce65d76 jdk7-b69
......@@ -116,11 +116,11 @@ char* getStringPlatformChars(JNIEnv* env, jstring jstr) {
char *result = NULL;
size_t len;
const jchar* utf16 = env->GetStringChars(jstr, NULL);
len = wcstombs(NULL, utf16, env->GetStringLength(jstr) * 4) + 1;
len = wcstombs(NULL, (const wchar_t*)utf16, env->GetStringLength(jstr) * 4) + 1;
if (len == -1)
return NULL;
result = (char*) malloc(len);
if (wcstombs(result, utf16, len) == -1)
if (wcstombs(result, (const wchar_t*)utf16, len) == -1)
return NULL;
env->ReleaseStringChars(jstr, utf16);
return result;
......@@ -640,7 +640,7 @@ JNIEXPORT void JNICALL Java_sun_jkernel_DownloadManager_startBackgroundDownloadW
}
void getParent(const TCHAR *path, TCHAR *dest) {
void getParent(TCHAR *path, TCHAR *dest) {
char* lastSlash = max(strrchr(path, '\\'), strrchr(path, '/'));
if (lastSlash == NULL) {
*dest = NULL;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册