From f914a5443e11075ba3f4bb98ea6aff2ece9f7bd5 Mon Sep 17 00:00:00 2001 From: "scc%mozilla.org" Date: Wed, 17 May 2006 02:33:16 +0000 Subject: [PATCH] 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 --- mozilla/intl/uconv/util/nsUnicodeDecodeHelper.cpp | 8 ++++---- mozilla/intl/uconv/util/nsUnicodeEncodeHelper.cpp | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/mozilla/intl/uconv/util/nsUnicodeDecodeHelper.cpp b/mozilla/intl/uconv/util/nsUnicodeDecodeHelper.cpp index 63c17b136dd..c0d54e51987 100644 --- a/mozilla/intl/uconv/util/nsUnicodeDecodeHelper.cpp +++ b/mozilla/intl/uconv/util/nsUnicodeDecodeHelper.cpp @@ -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; diff --git a/mozilla/intl/uconv/util/nsUnicodeEncodeHelper.cpp b/mozilla/intl/uconv/util/nsUnicodeEncodeHelper.cpp index 5b00b214ec1..9e80dc04867 100644 --- a/mozilla/intl/uconv/util/nsUnicodeEncodeHelper.cpp +++ b/mozilla/intl/uconv/util/nsUnicodeEncodeHelper.cpp @@ -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