Author: borisk
Date: Tue Nov 24 07:24:53 2009
New Revision: 883612

URL: http://svn.apache.org/viewvc?rev=883612&view=rev
Log:
We don't need to call u_init in ICU 3.6 and later.

Modified:
    xerces/c/trunk/src/xercesc/util/MsgLoaders/ICU/ICUMsgLoader.cpp
    xerces/c/trunk/src/xercesc/util/Transcoders/ICU/ICUTransService.cpp

Modified: xerces/c/trunk/src/xercesc/util/MsgLoaders/ICU/ICUMsgLoader.cpp
URL: 
http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/util/MsgLoaders/ICU/ICUMsgLoader.cpp?rev=883612&r1=883611&r2=883612&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/util/MsgLoaders/ICU/ICUMsgLoader.cpp (original)
+++ xerces/c/trunk/src/xercesc/util/MsgLoaders/ICU/ICUMsgLoader.cpp Tue Nov 24 
07:24:53 2009
@@ -199,7 +199,6 @@
     {
         XMLPlatformUtils::panic(PanicHandler::Panic_CantLoadMsgDomain);
     }
-
 }
 
 ICUMsgLoader::~ICUMsgLoader()

Modified: xerces/c/trunk/src/xercesc/util/Transcoders/ICU/ICUTransService.cpp
URL: 
http://svn.apache.org/viewvc/xerces/c/trunk/src/xercesc/util/Transcoders/ICU/ICUTransService.cpp?rev=883612&r1=883611&r2=883612&view=diff
==============================================================================
--- xerces/c/trunk/src/xercesc/util/Transcoders/ICU/ICUTransService.cpp 
(original)
+++ xerces/c/trunk/src/xercesc/util/Transcoders/ICU/ICUTransService.cpp Tue Nov 
24 07:24:53 2009
@@ -5,9 +5,9 @@
  * The ASF licenses this file to You under the Apache License, Version 2.0
  * (the "License"); you may not use this file except in compliance with
  * the License.  You may obtain a copy of the License at
- * 
+ *
  *      http://www.apache.org/licenses/LICENSE-2.0
- * 
+ *
  * Unless required by applicable law or agreed to in writing, software
  * distributed under the License is distributed on an "AS IS" BASIS,
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@@ -138,12 +138,15 @@
 // ---------------------------------------------------------------------------
 ICUTransService::ICUTransService(MemoryManager* manager)
 {
-#if (U_ICU_VERSION_MAJOR_NUM > 2 || (U_ICU_VERSION_MAJOR_NUM == 2 && 
U_ICU_VERSION_MINOR_NUM >= 6))
+  // Starting with ICU 3.4 we don't need to call init anymore.
+  //
+#if (U_ICU_VERSION_MAJOR_NUM > 2 || (U_ICU_VERSION_MAJOR_NUM == 2 && 
U_ICU_VERSION_MINOR_NUM >= 6)) && \
+  (U_ICU_VERSION_MAJOR_NUM < 3 || (U_ICU_VERSION_MAJOR_NUM == 3 && 
U_ICU_VERSION_MINOR_NUM < 4))
     UErrorCode errorCode=U_ZERO_ERROR;
     u_init(&errorCode);
     if(U_FAILURE(errorCode)) {
         XMLPlatformUtils::panic(PanicHandler::Panic_NoTransService);
-    }    
+    }
 #endif
 
 #if !defined(XML_OS390) && !defined(XML_AS400) && !defined(XML_HPUX) && 
!defined(XML_PTX)
@@ -368,11 +371,11 @@
                     , const XMLSize_t               blockSize
                     ,       MemoryManager* const    manager)
 {
-    //  
-    //  For encodings that end with "s390" we need to strip off the "s390" 
-    //  from the encoding name and add ",swaplfnl" to the encoding name        
-    //  that we pass into ICU on the ucnv_openU.  
-    //  
+    //
+    //  For encodings that end with "s390" we need to strip off the "s390"
+    //  from the encoding name and add ",swaplfnl" to the encoding name
+    //  that we pass into ICU on the ucnv_openU.
+    //
     XMLCh* encodingNameToUse = (XMLCh*) encodingName;
     XMLCh* workBuffer = 0;
 



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to