uconverter-suck
author Benjamin Smedberg <benjamin@smedbergs.us>
Sat, 26 Jul 2008 22:49:39 -0400
changeset 167 a4da40849f5436e629c5732f4368c6c48189637f
parent 58 8ecbd849199dbe6e9e281aa564c617fd9eba4899
permissions -rw-r--r--
State as of now

diff --git a/intl/uconv/public/nsEncoderDecoderUtils.h b/intl/uconv/public/nsEncoderDecoderUtils.h
--- a/intl/uconv/public/nsEncoderDecoderUtils.h
+++ b/intl/uconv/public/nsEncoderDecoderUtils.h
@@ -73,7 +73,7 @@ nsUConverterRegSelf(nsIComponentManager 
                     const nsModuleComponentInfo *info)                  \
 {                                                                       \
   nsresult rv;                                                          \
-  nsCOMPtr<nsICategoryManager> catman =                                 \
+  nsICategoryManager* catman =                                          \
     do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv);                  \
   if (NS_FAILED(rv)) return rv;                                         \
                                                                         \
@@ -105,7 +105,7 @@ nsUConverterUnregSelf(nsIComponentManage
                       const nsModuleComponentInfo *info)                    \
 { \
   nsresult rv;                                                          \
-  nsCOMPtr<nsICategoryManager> catman =                                 \
+  nsICategoryManager* catman =                                          \
   do_GetService(NS_CATEGORYMANAGER_CONTRACTID, &rv);                    \
   if (NS_FAILED(rv)) return rv;                                         \
                                                                         \
diff --git a/intl/uconv/ucvko/nsUnicodeToJamoTTF.cpp b/intl/uconv/ucvko/nsUnicodeToJamoTTF.cpp
--- a/intl/uconv/ucvko/nsUnicodeToJamoTTF.cpp
+++ b/intl/uconv/ucvko/nsUnicodeToJamoTTF.cpp
@@ -134,7 +134,7 @@ typedef struct {
 #define UP_TBASE 0xE404  // 0xE400 = Tfill, 0xE404 = Kiyeok
 
 // EUC-KR decoder for FillInfo.
-static nsCOMPtr<nsIUnicodeDecoder> gDecoder = 0;
+static nsIUnicodeDecoder* gDecoder = 0;
   
 static inline void FillInfoRange     (PRUint32* aInfo, PRUint32 aStart, 
                                       PRUint32 aEnd);
@@ -750,19 +750,17 @@ nsresult GetDecoder(nsIUnicodeDecoder** 
   nsresult rv; 
 
   if (gDecoder) {
-    *aDecoder = gDecoder.get();
-    NS_ADDREF(*aDecoder);
+    *aDecoder = gDecoder;
     return NS_OK;
   }
 
   nsCOMPtr<nsICharsetConverterManager> charsetConverterManager;
   charsetConverterManager = do_GetService(NS_CHARSETCONVERTERMANAGER_CONTRACTID, &rv);
   NS_ENSURE_SUCCESS(rv,rv);
-  rv = charsetConverterManager->GetUnicodeDecoderRaw("EUC-KR", getter_AddRefs(gDecoder));
+  rv = charsetConverterManager->GetUnicodeDecoderRaw("EUC-KR", &gDecoder);
   NS_ENSURE_SUCCESS(rv,rv);
 
-  *aDecoder = gDecoder.get();
-  NS_ADDREF(*aDecoder);
+  *aDecoder = gDecoder;
   return NS_OK;
 }