make xerces-c_2_6.dll delay-loadable
------------------------------------

         Key: XERCESC-1447
         URL: http://issues.apache.org/jira/browse/XERCESC-1447
     Project: Xerces-C++
        Type: Improvement
  Components: Utilities  
    Versions: 2.6.0    
 Environment: Windows XP, VC 6.0
    Reporter: eithanz


xerces-c_2_6.dll is not delay-loadable due to some static class data being 
exported in headers.
The fixes are:

In utils/PlatformUtils.hpp, change locale to default to 0 instead of 
XMLUni::fgXercescDefaultLocale:

    static void Initialize(const char*          const locale = 0 /*[ez] 
XMLUni::fgXercescDefaultLocale*/
                         , const char*          const nlsHome = 0
                         ,       PanicHandler*  const panicHandler = 0
                         ,       MemoryManager* const memoryManager = 0);

In utils/PlatformUtils.cpp under XMLPlatformUtils::Initialize, if locale is 
null then change to default XMLUni::fgXercescDefaultLocale:

   XMLMsgLoader::setLocale(locale != 0 ? locale : 
XMLUni::fgXercescDefaultLocale); //[ez] set locale to default if null

In parsers/XercesDOMParser.hpp, change default of manager to 0 instead of 
XMLPlatformUtils::fgMemoryManager:

    XercesDOMParser
    (
          XMLValidator* const   valToAdopt = 0
        , MemoryManager* const  manager = 0 /*[ez] 
XMLPlatformUtils::fgMemoryManager*/
        , XMLGrammarPool* const gramPool = 0        
    );

In parsers/XercesDOMParser.cpp, if manager is null then set to default 
XMLPlatformUtils::fgMemoryManager:

XercesDOMParser::XercesDOMParser( XMLValidator* const   valToAdopt
                                , MemoryManager* const  manager
                                , XMLGrammarPool* const gramPool):
   // [ez] set manager to default if null
   AbstractDOMParser(valToAdopt, (manager ? manager : 
XMLPlatformUtils::fgMemoryManager), gramPool)
   , fEntityResolver(0)
   , fXMLEntityResolver(0)
   , fErrorHandler(0)
{
}


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to