fix type equivalence between |PRUnichar| and |jschar| now that |PRUnchar| may be |wchar_t| on select platforms

git-svn-id: svn://10.0.0.236/trunk@197414 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
scc%mozilla.org
2006-05-17 02:33:16 +00:00
parent 1a1c285de2
commit f914a5443e
2 changed files with 6 additions and 6 deletions

View File

@@ -115,13 +115,13 @@ NS_IMETHODIMP nsUnicodeDecodeHelper::ConvertByTable(
nsresult res = NS_OK;
while ((srcLen > 0) && (dest < destEnd)) {
if (!uScan(aShiftTable, NULL, (PRUint8 *)src, &med, srcLen,
if (!uScan(aShiftTable, NULL, (PRUint8 *)src, NS_REINTERPRET_CAST(PRUint16*, &med), srcLen,
(PRUint32 *)&bcr)) {
res = NS_OK_UDEC_MOREINPUT;
break;
}
if (!uMapCode((uTable*) aMappingTable, med, dest)) {
if (!uMapCode((uTable*) aMappingTable, NS_STATIC_CAST(PRUint16, med), NS_REINTERPRET_CAST(PRUint16*, dest))) {
if (med < 0x20) {
// somehow some table miss the 0x00 - 0x20 part
*dest = med;
@@ -173,13 +173,13 @@ NS_IMETHODIMP nsUnicodeDecodeHelper::ConvertByMultiTable(
break;
}
if (!uScan(aShiftTable[i], NULL, src, &med, srcLen,
if (!uScan(aShiftTable[i], NULL, src, NS_REINTERPRET_CAST(PRUint16*, &med), srcLen,
(PRUint32 *)&bcr)) {
res = NS_OK_UDEC_MOREINPUT;
break;
}
if (!uMapCode((uTable*) aMappingTable[i], med, dest)) {
if (!uMapCode((uTable*) aMappingTable[i], NS_STATIC_CAST(PRUint16, med), NS_REINTERPRET_CAST(PRUint16*, dest))) {
if (med < 0x20) {
// somehow some table miss the 0x00 - 0x20 part
*dest = med;