mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 453094 - Some strong type conversion make GCC not complain; r=jorendorff sr=peterv
This commit is contained in:
parent
c0e84d173f
commit
86206e20f5
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user