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

This commit is contained in:
scc@mozilla.org
2006-05-17 02:33:20 +00:00
parent aa11085ff4
commit c6078ab946
2 changed files with 6 additions and 6 deletions

View File

@@ -109,7 +109,7 @@ NS_IMETHODIMP nsUnicodeEncodeHelper::ConvertByTable(
nsresult res = NS_OK;
while (src < srcEnd) {
if (!uMapCode((uTable*) aMappingTable, *(src++), &med)) {
if (!uMapCode((uTable*) aMappingTable, NS_STATIC_CAST(PRUnichar, *(src++)), NS_REINTERPRET_CAST(PRUint16*, &med))) {
res = NS_ERROR_UENC_NOMAPPING;
break;
}
@@ -151,7 +151,7 @@ NS_IMETHODIMP nsUnicodeEncodeHelper::ConvertByMultiTable(
while (src < srcEnd) {
for (i=0; i<aTableCount; i++)
if (uMapCode((uTable*) aMappingTable[i], *src, &med)) break;
if (uMapCode((uTable*) aMappingTable[i], NS_STATIC_CAST(PRUint16, *src), NS_REINTERPRET_CAST(PRUint16*, &med))) break;
src++;
if (i == aTableCount) {