зеркало из https://github.com/mozilla/pjs.git
Bug 453094 - Some strong type conversion make GCC not complain; r=jorendorff sr=peterv
This commit is contained in:
Родитель
b4d81aac7f
Коммит
45afc6261a
|
@ -348,7 +348,7 @@ xpc_qsDOMString::xpc_qsDOMString(JSContext *cx, jsval *pval)
|
|||
typedef implementation_type::char_traits traits;
|
||||
jsval v;
|
||||
JSString *s;
|
||||
const jschar *chars;
|
||||
const PRUnichar *chars;
|
||||
size_t len;
|
||||
|
||||
v = *pval;
|
||||
|
@ -376,7 +376,7 @@ xpc_qsDOMString::xpc_qsDOMString(JSContext *cx, jsval *pval)
|
|||
}
|
||||
|
||||
len = JS_GetStringLength(s);
|
||||
chars = (len == 0 ? traits::sEmptyBuffer : JS_GetStringChars(s));
|
||||
chars = (len == 0 ? traits::sEmptyBuffer : (const PRUnichar*)JS_GetStringChars(s));
|
||||
new(mBuf) implementation_type(chars, len);
|
||||
mValid = JS_TRUE;
|
||||
}
|
||||
|
@ -387,7 +387,7 @@ xpc_qsAString::xpc_qsAString(JSContext *cx, jsval *pval)
|
|||
typedef implementation_type::char_traits traits;
|
||||
jsval v;
|
||||
JSString *s;
|
||||
const jschar *chars;
|
||||
const PRUnichar *chars;
|
||||
size_t len;
|
||||
|
||||
v = *pval;
|
||||
|
@ -415,7 +415,7 @@ xpc_qsAString::xpc_qsAString(JSContext *cx, jsval *pval)
|
|||
}
|
||||
|
||||
len = JS_GetStringLength(s);
|
||||
chars = (len == 0 ? traits::sEmptyBuffer : JS_GetStringChars(s));
|
||||
chars = (len == 0 ? traits::sEmptyBuffer : (const PRUnichar*)JS_GetStringChars(s));
|
||||
new(mBuf) implementation_type(chars, len);
|
||||
mValid = JS_TRUE;
|
||||
}
|
||||
|
@ -720,7 +720,7 @@ xpc_qsJsvalToWcharStr(JSContext *cx, jsval *pval, PRUnichar **pstr)
|
|||
*pval = STRING_TO_JSVAL(str); // Root the new string.
|
||||
}
|
||||
|
||||
*pstr = JS_GetStringChars(str);
|
||||
*pstr = (PRUnichar*)JS_GetStringChars(str);
|
||||
return JS_TRUE;
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче