You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by mh...@apache.org on 2004/11/09 17:06:08 UTC

cvs commit: xml-xalan/c/src/xalanc/XalanTransformer XalanTransformer.cpp XalanTransformer.hpp

mhoyt       2004/11/09 08:06:08

  Modified:    c/src/xalanc/Harness XalanFileUtility.cpp
               c/src/xalanc/Include STLHelper.hpp VCPPDefinitions.hpp
                        XalanDeque.hpp XalanMemMgrAutoPtr.hpp
                        XalanMemoryManagement.hpp XalanObjectStackCache.hpp
                        XalanVector.hpp
               c/src/xalanc/PlatformSupport DOMStringHelper.hpp
                        DirectoryEnumerator.hpp
                        NamedNodeMapAttributeList.hpp
                        ReusableArenaAllocator.hpp ReusableArenaBlock.hpp
                        XalanArrayAllocator.hpp XalanFileOutputStream.cpp
               c/src/xalanc/XMLSupport FormatterToXML_UTF16.cpp
                        FormatterToXML_UTF8.cpp
               c/src/xalanc/XPath NameSpace.hpp XNodeSetBase.hpp
                        XObject.cpp XPathEnvSupportDefault.cpp
                        XPathFunctionTable.cpp XPathFunctionTable.hpp
               c/src/xalanc/XSLT FunctionSystemProperty.hpp
                        OutputContextStack.cpp ResultNamespacesStack.cpp
                        Stylesheet.cpp TopLevelArg.hpp XSLTEngineImpl.cpp
                        XSLTResultTarget.hpp
               c/src/xalanc/XalanDOM XalanDOMString.cpp XalanDOMString.hpp
               c/src/xalanc/XalanSourceTree
                        XalanSourceTreeDocumentFragment.hpp
               c/src/xalanc/XalanTransformer XalanTransformer.cpp
                        XalanTransformer.hpp
  Log:
  Minor changes to enable builds with gcc3.1, VACPP 6.0, Sun C++ 5.3
  
  Revision  Changes    Path
  1.3       +1 -1      xml-xalan/c/src/xalanc/Harness/XalanFileUtility.cpp
  
  Index: XalanFileUtility.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/Harness/XalanFileUtility.cpp,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- XalanFileUtility.cpp	8 Nov 2004 18:05:41 -0000	1.2
  +++ XalanFileUtility.cpp	9 Nov 2004 16:06:04 -0000	1.3
  @@ -1957,7 +1957,7 @@
           pathStatus=false;
       
       char buffer5[PATH_MAX];
  -    XalanDOMString resultPath(getcwd(buffer5, PATH_MAX));
  +    XalanDOMString resultPath(getcwd(buffer5, PATH_MAX), XalanMemMgrs::getDefaultXercesMemMgr());
       append(resultPath, s_pathSep);
   #endif
       
  
  
  
  1.9       +5 -6      xml-xalan/c/src/xalanc/Include/STLHelper.hpp
  
  Index: STLHelper.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/Include/STLHelper.hpp,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- STLHelper.hpp	8 Nov 2004 18:08:50 -0000	1.8
  +++ STLHelper.hpp	9 Nov 2004 16:06:04 -0000	1.9
  @@ -67,12 +67,11 @@
   	result_type
   	operator()(argument_type	thePointer) const
   	{
  -        if( thePointer == 0 )
  -            return;
  -
  -		thePointer->~T();
  -        
  -        m_memoryManager.deallocate((void*)thePointer);
  +        if( thePointer != 0 )
  +	{
  +		const_cast<T*>(thePointer)->~T();
  +        	m_memoryManager.deallocate((void*)thePointer);
  +	}
   	}
   
   private:
  
  
  
  1.10      +1 -0      xml-xalan/c/src/xalanc/Include/VCPPDefinitions.hpp
  
  Index: VCPPDefinitions.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/Include/VCPPDefinitions.hpp,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- VCPPDefinitions.hpp	13 Aug 2004 14:29:56 -0000	1.9
  +++ VCPPDefinitions.hpp	9 Nov 2004 16:06:04 -0000	1.10
  @@ -43,6 +43,7 @@
   #define XALAN_VCPP_USE_PTRIT
   #endif
   #else
  +#define XALAN_REQUIRES_QUALIFIED_DESTRUCTOR
   #define XALAN_NO_COVARIANT_RETURN_TYPE
   #endif
   
  
  
  
  1.6       +3 -3      xml-xalan/c/src/xalanc/Include/XalanDeque.hpp
  
  Index: XalanDeque.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/Include/XalanDeque.hpp,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- XalanDeque.hpp	8 Nov 2004 18:08:50 -0000	1.5
  +++ XalanDeque.hpp	9 Nov 2004 16:06:04 -0000	1.6
  @@ -438,12 +438,12 @@
       	m_memoryManager->deallocate(pointer);
       }
   
  -    BlockIndexType     m_blockIndex; 
  -    BlockIndexType     m_freeBlockVector;
  -    
       MemoryManagerType*  m_memoryManager;
       const size_type     m_blockSize;
   
  +    BlockIndexType     m_blockIndex; 
  +    BlockIndexType     m_freeBlockVector;
  +    
   private:
   	// Not implemented
   	XalanDeque();
  
  
  
  1.5       +5 -5      xml-xalan/c/src/xalanc/Include/XalanMemMgrAutoPtr.hpp
  
  Index: XalanMemMgrAutoPtr.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/Include/XalanMemMgrAutoPtr.hpp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- XalanMemMgrAutoPtr.hpp	8 Nov 2004 18:08:50 -0000	1.4
  +++ XalanMemMgrAutoPtr.hpp	9 Nov 2004 16:06:04 -0000	1.5
  @@ -68,7 +68,7 @@
   		bool
   		isInitilized()const
   		{
  -			return ( (first != 0) && (second != 0) )? true : false;
  +			return ( (this->first != 0) && (this->second != 0) )? true : false;
   		}
   	
   		void
  @@ -80,10 +80,10 @@
   			{		
   				if ( toCallDestructor ) 
   				{
  -					second->~Type();
  +					this->second->~Type();
   				}
   
  -				first->deallocate(second);
  +				this->first->deallocate(this->second);
   			}
   		}
   		
  @@ -93,9 +93,9 @@
   		{	
   			invariants();
   
  -			first = m_memoryManager;
  +			this->first = m_memoryManager;
   			
  -			second = m_dataPointer;
  +			this->second = m_dataPointer;
   
   			invariants();
   		}	
  
  
  
  1.7       +5 -2      xml-xalan/c/src/xalanc/Include/XalanMemoryManagement.hpp
  
  Index: XalanMemoryManagement.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/Include/XalanMemoryManagement.hpp,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- XalanMemoryManagement.hpp	8 Nov 2004 18:08:50 -0000	1.6
  +++ XalanMemoryManagement.hpp	9 Nov 2004 16:06:04 -0000	1.7
  @@ -18,8 +18,13 @@
   
   
   // Base include file.  Must be first.
  +#include <new>
  +
  +
   #include <xalanc/Include/PlatformDefinitions.hpp>
   
  +
  +
   #include <xercesc/framework/MemoryManager.hpp>
   
   
  @@ -106,8 +111,6 @@
   };
   
   #define  XALAN_USES_MEMORY_MANAGER(Type)  \
  -XALAN_USING_XALAN(MemoryManagedConstructionTraits) \
  -XALAN_USING_XALAN(ConstructWithMemoryManager) \
   template<> \
   struct MemoryManagedConstructionTraits<Type> \
       { \
  
  
  
  1.5       +3 -3      xml-xalan/c/src/xalanc/Include/XalanObjectStackCache.hpp
  
  Index: XalanObjectStackCache.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/Include/XalanObjectStackCache.hpp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- XalanObjectStackCache.hpp	8 Nov 2004 18:08:50 -0000	1.4
  +++ XalanObjectStackCache.hpp	9 Nov 2004 16:06:04 -0000	1.5
  @@ -54,10 +54,10 @@
   	explicit
   	XalanObjectStackCache(MemoryManagerType& theManager, 
                             unsigned int	initialListSize = 0) :
  -		m_stack(theManager),
  -        m_numObjectsOnStack(0),
           m_createFunctor(),
  -        m_deleteFunctor(theManager)
  +        m_deleteFunctor(theManager),
  +	m_stack(theManager),
  +        m_numObjectsOnStack(0)
   	{
   		m_stack.reserve(initialListSize);
   
  
  
  
  1.10      +1 -0      xml-xalan/c/src/xalanc/Include/XalanVector.hpp
  
  Index: XalanVector.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/Include/XalanVector.hpp,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- XalanVector.hpp	8 Nov 2004 18:08:50 -0000	1.9
  +++ XalanVector.hpp	9 Nov 2004 16:06:04 -0000	1.10
  @@ -29,6 +29,7 @@
   
   
   #include <xalanc/Include/XalanMemoryManagement.hpp>
  +#include <xalanc/Include/XalanMemMgrAutoPtr.hpp>
   
   
   #include <cstddef>
  
  
  
  1.10      +1 -2      xml-xalan/c/src/xalanc/PlatformSupport/DOMStringHelper.hpp
  
  Index: DOMStringHelper.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/PlatformSupport/DOMStringHelper.hpp,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- DOMStringHelper.hpp	8 Nov 2004 18:11:05 -0000	1.9
  +++ DOMStringHelper.hpp	9 Nov 2004 16:06:04 -0000	1.10
  @@ -69,8 +69,7 @@
   
   #else
   
  -#define XALAN_STATIC_UCODE_STRING(str) XALAN_CPP_NAMESPACE_QUALIFIER TranscodeFromLocalCodePage(str)
  -
  +#define XALAN_STATIC_UCODE_STRING(str) str
   
   
   #endif
  
  
  
  1.15      +9 -8      xml-xalan/c/src/xalanc/PlatformSupport/DirectoryEnumerator.hpp
  
  Index: DirectoryEnumerator.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/PlatformSupport/DirectoryEnumerator.hpp,v
  retrieving revision 1.14
  retrieving revision 1.15
  diff -u -r1.14 -r1.15
  --- DirectoryEnumerator.hpp	8 Nov 2004 18:11:05 -0000	1.14
  +++ DirectoryEnumerator.hpp	9 Nov 2004 16:06:04 -0000	1.15
  @@ -149,8 +149,9 @@
    
   		if ( retCode == -1 )
   		{
  +			XalanDOMString theBuffer(XalanMemMgrs::getDefaultXercesMemMgr());
   			typedef	XalanFileOutputStream::XalanFileOutputStreamOpenException XalanStatDirectoryException;
  -			throw	XalanStatDirectoryException( XalanDOMString(d_name), errno );
  +			throw	XalanStatDirectoryException( XalanDOMString(d_name, XalanMemMgrs::getDefaultXercesMemMgr()), errno , theBuffer);
   		}
   
   		return S_ISDIR(stat_Info.st_mode);
  @@ -240,6 +241,7 @@
   			bool						fIncludeSelfAndParent = false)
   #endif
   {
  +    MemoryManagerType& theManager = XalanMemMgrs::getDefaultXercesMemMgr();
   #if defined(_MSC_VER)
   	FindFileStruct 		theFindData;
   	
  @@ -254,7 +256,6 @@
   	theHandleType	theSearchHandle = _wfindfirst(const_cast<wchar_t*>(theConversionFunction(theFullSearchSpec)),
   										  &theFindData);
   #pragma warning(pop)
  -    MemoryManagerType& theManager = XalanMemMgrs::getDefaultXercesMemMgr();
   
   	if (theSearchHandle != -1)
   	{
  @@ -338,8 +339,8 @@
   #endif
   
   			int lenSpec = strlen(theSpec); 
  -			theFullSearchSpec.substr(lenSpec, indexName, theName); 
  -			theFullSearchSpec.substr(lenSpec+indexName+1, indexSuffix, theSuffix);
  +			theFullSearchSpec.substr(theName, lenSpec, indexName); 
  +			theFullSearchSpec.substr(theSuffix, lenSpec+indexName+1, indexSuffix);
   		}
   
   		DIR* const	theDirectory = opendir(theSpec);
  @@ -360,18 +361,18 @@
   						{
   							if( target_Dir )
   							{
  -								*theOutputIterator = StringType(theEntry->getName());
  +								*theOutputIterator = StringType(theEntry->getName(), theManager);
   							}
   							else
   							{
  -								XalanDOMString	Getname(StringType(theEntry->getName(), theManager));
  +								XalanDOMString	Getname(theEntry->getName(), theManager);
   								int	Check_1 = Getname.compare(theName);
   								XalanDOMString	GetnameSuffix(theManager);
  -                                Getname.substr(length(Getname)-indexSuffix, indexSuffix, GetnameSuffix);            
  +                                Getname.substr(GetnameSuffix, Getname.size() -indexSuffix, indexSuffix);            
   								int Check_2 = GetnameSuffix.compare(theSuffix);
   								if ( Check_1 == 1 && (!Check_2) )
   								{
  -									*theOutputIterator = Getname;
  +								*theOutputIterator = StringType(theEntry->getName(), theManager);
   								}
   							}
   						}
  
  
  
  1.8       +1 -1      xml-xalan/c/src/xalanc/PlatformSupport/NamedNodeMapAttributeList.hpp
  
  Index: NamedNodeMapAttributeList.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/PlatformSupport/NamedNodeMapAttributeList.hpp,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- NamedNodeMapAttributeList.hpp	8 Nov 2004 18:11:05 -0000	1.7
  +++ NamedNodeMapAttributeList.hpp	9 Nov 2004 16:06:04 -0000	1.8
  @@ -87,7 +87,7 @@
   
   	static const XalanDOMChar	s_typeString[];
   
  -    mutable MemoryManagerType&  m_memoryManager;
  +    	MemoryManagerType&  m_memoryManager;
   };
   
   
  
  
  
  1.8       +1 -1      xml-xalan/c/src/xalanc/PlatformSupport/ReusableArenaAllocator.hpp
  
  Index: ReusableArenaAllocator.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/PlatformSupport/ReusableArenaAllocator.hpp,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- ReusableArenaAllocator.hpp	8 Nov 2004 18:11:05 -0000	1.7
  +++ ReusableArenaAllocator.hpp	9 Nov 2004 16:06:04 -0000	1.8
  @@ -191,7 +191,7 @@
   		if( this->m_blocks.empty() 
   			|| !this->m_blocks.front()->blockAvailable() )
   		{
  -            this->m_blocks.push_front(ReusableArenaBlockType::create(getMemoryManager(), this->m_blockSize));
  +            this->m_blocks.push_front(ReusableArenaBlockType::create(this->getMemoryManager(), this->m_blockSize));
   			
   			assert( this->m_blocks.front() != 0 );
   		}
  
  
  
  1.13      +5 -0      xml-xalan/c/src/xalanc/PlatformSupport/ReusableArenaBlock.hpp
  
  Index: ReusableArenaBlock.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/PlatformSupport/ReusableArenaBlock.hpp,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- ReusableArenaBlock.hpp	8 Nov 2004 18:11:05 -0000	1.12
  +++ ReusableArenaBlock.hpp	9 Nov 2004 16:06:04 -0000	1.13
  @@ -21,6 +21,11 @@
   #include <xalanc/PlatformSupport/ArenaBlockBase.hpp>
   
   
  +
  +#include <xalanc/Include/XalanMemMgrAutoPtr.hpp>
  +
  +
  +
   XALAN_CPP_NAMESPACE_BEGIN
   
   template<bool> struct CompileTimeError;
  
  
  
  1.9       +6 -3      xml-xalan/c/src/xalanc/PlatformSupport/XalanArrayAllocator.hpp
  
  Index: XalanArrayAllocator.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/PlatformSupport/XalanArrayAllocator.hpp,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- XalanArrayAllocator.hpp	8 Nov 2004 18:11:05 -0000	1.8
  +++ XalanArrayAllocator.hpp	9 Nov 2004 16:06:04 -0000	1.9
  @@ -69,7 +69,7 @@
   
       ~XalanArrayAllocator()
       {        
  -        ListType::iterator iter = m_list.begin();
  +        typename ListType::iterator iter = m_list.begin();
   
           MemoryManagerType& theManager = m_list.getMemoryManager();
   
  @@ -77,8 +77,11 @@
           {
               if( (*iter).second != 0)
               {
  -                (*iter).second->VectorType::~VectorType();
  -                
  +#if defined(XALAN_REQUIRES_QUALIFIED_DESTRUCTOR)
  +				(*iter).second->VectorType::~VectorType();
  +#else
  +                (*iter).second->~VectorType();
  +#endif               
                   theManager.deallocate((void*)(*iter).second);
               }
           }
  
  
  
  1.12      +4 -2      xml-xalan/c/src/xalanc/PlatformSupport/XalanFileOutputStream.cpp
  
  Index: XalanFileOutputStream.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/PlatformSupport/XalanFileOutputStream.cpp,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- XalanFileOutputStream.cpp	8 Nov 2004 18:11:05 -0000	1.11
  +++ XalanFileOutputStream.cpp	9 Nov 2004 16:06:04 -0000	1.12
  @@ -266,9 +266,11 @@
   #if !defined(WIN32)
   	if (fflush(m_handle) != 0)
   	{
  +        	XalanDOMString theBuffer(getMemoryManager());
   		throw XalanFileOutputStreamWriteException(
   			m_fileName,
  -			errno);
  +			errno,
  +			theBuffer);
   	}
   #endif
   }
  @@ -304,7 +306,7 @@
   
   	if (theBytesWritten != theBufferLength)
   	{
  -       XalanDOMString theBuffer(theManager);
  +       XalanDOMString theBuffer(getMemoryManager());
   
   		throw XalanFileOutputStreamWriteException(
   			m_fileName,
  
  
  
  1.14      +7 -1      xml-xalan/c/src/xalanc/XMLSupport/FormatterToXML_UTF16.cpp
  
  Index: FormatterToXML_UTF16.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XMLSupport/FormatterToXML_UTF16.cpp,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- FormatterToXML_UTF16.cpp	8 Nov 2004 18:14:35 -0000	1.13
  +++ FormatterToXML_UTF16.cpp	9 Nov 2004 16:06:04 -0000	1.14
  @@ -22,8 +22,13 @@
   
   #include <xercesc/sax/AttributeList.hpp>
   
  +
  +
  +#include <xalanc/Include/XalanMemoryManagement.hpp>
   #include <xalanc/Include/XalanMemMgrAutoPtr.hpp>
   
  +
  +
   #include <xalanc/PlatformSupport/DOMStringHelper.hpp>
   #include <xalanc/PlatformSupport/Writer.hpp>
   #include <xalanc/PlatformSupport/XalanTranscodingServices.hpp>
  @@ -745,7 +750,8 @@
   void
   FormatterToXML_UTF16::terminate()
   {
  -	XalanDOMString(XalanMemMgrs::getDummyMemMgr()).swap(s_localUTF16String);
  +	XalanDOMString temp(XalanMemMgrs::getDummyMemMgr());
  +        temp.swap(s_localUTF16String);
   }
   
   
  
  
  
  1.14      +7 -1      xml-xalan/c/src/xalanc/XMLSupport/FormatterToXML_UTF8.cpp
  
  Index: FormatterToXML_UTF8.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XMLSupport/FormatterToXML_UTF8.cpp,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- FormatterToXML_UTF8.cpp	8 Nov 2004 18:14:35 -0000	1.13
  +++ FormatterToXML_UTF8.cpp	9 Nov 2004 16:06:04 -0000	1.14
  @@ -22,7 +22,12 @@
   
   #include <xercesc/sax/AttributeList.hpp>
   
  +
  +
   #include <xalanc/Include/XalanMemMgrAutoPtr.hpp>
  +#include <xalanc/Include/XalanMemoryManagement.hpp>
  +
  +
   
   #include <xalanc/PlatformSupport/DOMStringHelper.hpp>
   #include <xalanc/PlatformSupport/DoubleSupport.hpp>
  @@ -1012,7 +1017,8 @@
   void
   FormatterToXML_UTF8::terminate()
   {
  -	XalanDOMString(XalanMemMgrs::getDummyMemMgr()).swap(s_localUTF8String);
  +	XalanDOMString   temp(XalanMemMgrs::getDummyMemMgr());
  +        temp.swap(s_localUTF8String);
   }
   
   
  
  
  
  1.6       +1 -0      xml-xalan/c/src/xalanc/XPath/NameSpace.hpp
  
  Index: NameSpace.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XPath/NameSpace.hpp,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- NameSpace.hpp	8 Nov 2004 18:17:11 -0000	1.5
  +++ NameSpace.hpp	9 Nov 2004 16:06:05 -0000	1.6
  @@ -191,6 +191,7 @@
   	}	
   
   private:
  +	NameSpace(const NameSpace&);
   
   	XalanDOMString	m_prefix;
   
  
  
  
  1.9       +1 -1      xml-xalan/c/src/xalanc/XPath/XNodeSetBase.hpp
  
  Index: XNodeSetBase.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XPath/XNodeSetBase.hpp,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- XNodeSetBase.hpp	8 Nov 2004 18:17:12 -0000	1.8
  +++ XNodeSetBase.hpp	9 Nov 2004 16:06:05 -0000	1.9
  @@ -120,7 +120,7 @@
   
   	// Not implemented...
       XNodeSetBase();
  -    XNodeSetBase(const& XNodeSetBase);
  +    XNodeSetBase(const XNodeSetBase&);
   	XNodeSetBase&
   	operator=(const XNodeSetBase&);
   
  
  
  
  1.11      +7 -7      xml-xalan/c/src/xalanc/XPath/XObject.cpp
  
  Index: XObject.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XPath/XObject.cpp,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- XObject.cpp	8 Nov 2004 18:17:12 -0000	1.10
  +++ XObject.cpp	9 Nov 2004 16:06:05 -0000	1.11
  @@ -478,7 +478,7 @@
           return DOMStringEqualsFunction()(theLHS, theRHS.str());
   	}
   private:
  -   mutable MemoryManagerType& m_memoryManager;
  +   	MemoryManagerType& m_memoryManager;
   };
   
   
  @@ -515,7 +515,7 @@
   		return DOMStringNotEqualsFunction()(theLHS, theRHS.str());
   	}
   private:
  -   mutable MemoryManagerType& m_memoryManager;
  +   	MemoryManagerType& m_memoryManager;
   };
   
   
  @@ -558,7 +558,7 @@
                   theRHS.num());
   	}
   private:
  -   mutable MemoryManagerType& m_memoryManager;
  +   	MemoryManagerType& m_memoryManager;
   };
   
   
  @@ -601,7 +601,7 @@
                   theRHS.num());
   	}
   private:
  -   mutable MemoryManagerType& m_memoryManager;
  +   	MemoryManagerType& m_memoryManager;
   };
   
   
  @@ -644,7 +644,7 @@
                   theRHS.num());
   	}
   private:
  -  mutable  MemoryManagerType& m_memoryManager;
  +  	MemoryManagerType& m_memoryManager;
   };
   
   
  @@ -687,7 +687,7 @@
                   theRHS.num());
   	}
   private:
  -    mutable MemoryManagerType& m_memoryManager;
  +    	MemoryManagerType& m_memoryManager;
   };
   
   
  @@ -1126,7 +1126,7 @@
   			{
   				if (theLHSType == eTypeBoolean || theRHSType == eTypeBoolean)
   				{
  -					return boolean(executionContext.getMemoryManager()) != theRHS.boolean(executionContext.getMemoryManager());
  +					return boolean() != theRHS.boolean();
   				}
   				else if (theLHSType == eTypeNumber || theRHSType == eTypeNumber)
   				{
  
  
  
  1.7       +6 -4      xml-xalan/c/src/xalanc/XPath/XPathEnvSupportDefault.cpp
  
  Index: XPathEnvSupportDefault.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XPath/XPathEnvSupportDefault.cpp,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- XPathEnvSupportDefault.cpp	8 Nov 2004 18:17:12 -0000	1.6
  +++ XPathEnvSupportDefault.cpp	9 Nov 2004 16:06:05 -0000	1.7
  @@ -82,7 +82,8 @@
   			 s_externalFunctions.end(),
   			 NamespaceFunctionTableDeleteFunctor(s_externalFunctions.getMemoryManager()));
   
  -	NamespaceFunctionTablesType(XalanMemMgrs::getDummyMemMgr()).swap(s_externalFunctions);
  +	NamespaceFunctionTablesType temp(XalanMemMgrs::getDummyMemMgr());
  +	temp.swap(s_externalFunctions);
   }
   
   
  @@ -105,7 +106,8 @@
   			 m_externalFunctions.end(),
   			 NamespaceFunctionTableDeleteFunctor(m_externalFunctions.getMemoryManager()));
   
  -	NamespaceFunctionTablesType(XalanMemMgrs::getDummyMemMgr()).swap(m_externalFunctions);
  +	NamespaceFunctionTablesType temp(XalanMemMgrs::getDummyMemMgr());
  +	temp.swap(m_externalFunctions);
   }
   
   
  @@ -150,7 +152,7 @@
   		else
   		{
   			// Found it, so delete the function...
  -            (*j).second->~Function();
  +            const_cast<Function*>((*j).second)->~Function();
   
               MemoryManagerType& theManager = theTable.getMemoryManager();
   
  @@ -488,7 +490,7 @@
   
   	while(i != thePair.second.end())
   	{
  -        (*i).second->~Function();
  +        const_cast<Function*>((*i).second)->~Function();
   
           m_memMgr.deallocate((void*)(*i).second);
   
  
  
  
  1.7       +2 -2      xml-xalan/c/src/xalanc/XPath/XPathFunctionTable.cpp
  
  Index: XPathFunctionTable.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XPath/XPathFunctionTable.cpp,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- XPathFunctionTable.cpp	8 Nov 2004 18:17:12 -0000	1.6
  +++ XPathFunctionTable.cpp	9 Nov 2004 16:06:05 -0000	1.7
  @@ -163,7 +163,7 @@
   
   			m_functionTable[theFunctionID] = theFunction.clone(*m_memoryManager);
   
  -            theOldFunction->~Function();
  +            const_cast<Function*>(theOldFunction)->~Function();
   
               m_memoryManager->deallocate((void*)theOldFunction);
   		}
  @@ -190,7 +190,7 @@
   
           if( theFunction!=0 )
           {
  -            theFunction->~Function();
  +            const_cast<Function*>(theFunction)->~Function();
   
                m_memoryManager->deallocate((void*)theFunction);
           }
  
  
  
  1.7       +1 -1      xml-xalan/c/src/xalanc/XPath/XPathFunctionTable.hpp
  
  Index: XPathFunctionTable.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XPath/XPathFunctionTable.hpp,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- XPathFunctionTable.hpp	8 Nov 2004 18:17:12 -0000	1.6
  +++ XPathFunctionTable.hpp	9 Nov 2004 16:06:05 -0000	1.7
  @@ -290,7 +290,7 @@
   	void
   	getInstalledFunctionNames(OutputIteratorType	theIterator) const
   	{
  -		XalanDOMString	theString;
  +		XalanDOMString	theString(XalanMemMgrs::getDefaultXercesMemMgr());
   
   		for (int i = 0; i < TableSize; ++i)
   		{
  
  
  
  1.5       +2 -0      xml-xalan/c/src/xalanc/XSLT/FunctionSystemProperty.hpp
  
  Index: FunctionSystemProperty.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XSLT/FunctionSystemProperty.hpp,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- FunctionSystemProperty.hpp	8 Nov 2004 18:18:56 -0000	1.4
  +++ FunctionSystemProperty.hpp	9 Nov 2004 16:06:05 -0000	1.5
  @@ -73,6 +73,8 @@
   
   private:
   
  +	FunctionSystemProperty(const FunctionSystemProperty&);
  +
   	// Not implemented...
   	FunctionSystemProperty&
   	operator=(const FunctionSystemProperty&);
  
  
  
  1.7       +2 -1      xml-xalan/c/src/xalanc/XSLT/OutputContextStack.cpp
  
  Index: OutputContextStack.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XSLT/OutputContextStack.cpp,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- OutputContextStack.cpp	8 Nov 2004 18:18:56 -0000	1.6
  +++ OutputContextStack.cpp	9 Nov 2004 16:06:05 -0000	1.7
  @@ -87,7 +87,8 @@
   {
   	// Since we always keep one dummy entry at the beginning,
   	// swap with an OutputContextStackType instance of size 1.
  -	OutputContextStackType( XalanMemMgrs::getDummyMemMgr(), 1).swap(m_stack);
  +	OutputContextStackType	temp( XalanMemMgrs::getDummyMemMgr(), 1);
  +	temp.swap(m_stack);
   
   	m_stackPosition = m_stack.begin();
   
  
  
  
  1.7       +2 -1      xml-xalan/c/src/xalanc/XSLT/ResultNamespacesStack.cpp
  
  Index: ResultNamespacesStack.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XSLT/ResultNamespacesStack.cpp,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- ResultNamespacesStack.cpp	8 Nov 2004 18:18:56 -0000	1.6
  +++ ResultNamespacesStack.cpp	9 Nov 2004 16:06:05 -0000	1.7
  @@ -193,7 +193,8 @@
   {
   	// Since we always keep one dummy entry at the beginning,
   	// swap with an OutputContextStackType instance of size 1.
  - 	NamespacesStackType(XalanMemMgrs::getDummyMemMgr(), 1).swap(m_resultNamespaces);
  + 	NamespacesStackType temp(XalanMemMgrs::getDummyMemMgr(), 1);
  +	temp.swap(m_resultNamespaces);
   
   	m_stackBegin = m_resultNamespaces.begin();
   
  
  
  
  1.14      +9 -3      xml-xalan/c/src/xalanc/XSLT/Stylesheet.cpp
  
  Index: Stylesheet.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XSLT/Stylesheet.cpp,v
  retrieving revision 1.13
  retrieving revision 1.14
  diff -u -r1.13 -r1.14
  --- Stylesheet.cpp	8 Nov 2004 18:18:56 -0000	1.13
  +++ Stylesheet.cpp	9 Nov 2004 16:06:05 -0000	1.14
  @@ -562,14 +562,20 @@
   				(*i)->m_keyDeclarations.begin(),
   				(*i)->m_keyDeclarations.end());
   
  -			KeyDeclarationVectorType(getMemoryManager()).swap((*i)->m_keyDeclarations);
  +			{
  +				KeyDeclarationVectorType temp(getMemoryManager());
  +				temp.swap((*i)->m_keyDeclarations);
  +			}
   
   			m_whitespaceElements.insert(
   				m_whitespaceElements.end(),
   				(*i)->m_whitespaceElements.begin(),
   				(*i)->m_whitespaceElements.end());
   
  -			WhitespaceElementsVectorType(getMemoryManager()).swap((*i)->m_whitespaceElements);
  +			{
  +				WhitespaceElementsVectorType temp(getMemoryManager());
  +				temp.swap((*i)->m_whitespaceElements);
  +			}
   
   			++i;
   		}
  @@ -1365,7 +1371,7 @@
   
   					bestMatchedRule = bestMatchedPattern->getTemplate();
   
  -					conflictsString += XALAN_STATIC_UCODE_STRING(" ");
  +					conflictsString += XalanDOMString(XALAN_STATIC_UCODE_STRING(" "), executionContext.getMemoryManager());
   
                       StylesheetExecutionContext::GetAndReleaseCachedString theGuard1(executionContext);
   
  
  
  
  1.6       +1 -1      xml-xalan/c/src/xalanc/XSLT/TopLevelArg.hpp
  
  Index: TopLevelArg.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XSLT/TopLevelArg.hpp,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- TopLevelArg.hpp	8 Nov 2004 18:18:56 -0000	1.5
  +++ TopLevelArg.hpp	9 Nov 2004 16:06:05 -0000	1.6
  @@ -156,7 +156,7 @@
   	const XObjectPtr	m_xobject;
   };
   
  -XALAN_USES_MEMORY_MANAGER(TopLevelArg);
  +XALAN_USES_MEMORY_MANAGER(TopLevelArg)
   
   XALAN_CPP_NAMESPACE_END
   
  
  
  
  1.21      +13 -8     xml-xalan/c/src/xalanc/XSLT/XSLTEngineImpl.cpp
  
  Index: XSLTEngineImpl.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XSLT/XSLTEngineImpl.cpp,v
  retrieving revision 1.20
  retrieving revision 1.21
  diff -u -r1.20 -r1.21
  --- XSLTEngineImpl.cpp	8 Nov 2004 18:18:56 -0000	1.20
  +++ XSLTEngineImpl.cpp	9 Nov 2004 16:06:06 -0000	1.21
  @@ -515,11 +515,16 @@
   	if(0 == sourceTree)
   	{
           XPathConstructionContextDefault::GetAndReleaseCachedString theGuard(m_xpathConstructionContext);
  -
  -		const XalanDOMString	xmlIdentifier( 0 != inputSource.getSystemId() ?
  -												XalanDOMString(inputSource.getSystemId(), getMemoryManager()) :
  -												XalanMessageLoader::getMessage(XalanMessages::InputXML, theGuard.get()),
  -                                                getMemoryManager());
  +	
  +		XalanDOMString	xmlIdentifier(getMemoryManager());
  +		if (0 != inputSource.getSystemId())
  +		{
  +			xmlIdentifier = inputSource.getSystemId();
  +		}
  +		else
  +		{
  +			xmlIdentifier = XalanMessageLoader::getMessage(XalanMessages::InputXML, theGuard.get());
  +		}
   
   		if(m_diagnosticsPrintWriter != 0)
   		{
  @@ -732,7 +737,7 @@
           ds.append("id(");
   
   		ds += fragID;
  -		ds += XALAN_STATIC_UCODE_STRING(")");
  +		ds += XalanDOMString(XALAN_STATIC_UCODE_STRING(")"),getMemoryManager());
   
   		ElementPrefixResolverProxy		theProxy( getMemoryManager(), nsNode, m_xpathEnvSupport, m_domSupport);
   
  @@ -1416,9 +1421,9 @@
   
   		if(mode != 0 && mode->isEmpty() == false)
   		{
  -			msg += XALAN_STATIC_UCODE_STRING(", mode = {");
  +			msg += XalanDOMString(XALAN_STATIC_UCODE_STRING(", mode = {"), executionContext.getMemoryManager());
   			msg += mode->getNamespace();
  -			msg += XALAN_STATIC_UCODE_STRING("}");
  +			msg += XalanDOMString(XALAN_STATIC_UCODE_STRING("}"), executionContext.getMemoryManager());
   			msg += mode->getLocalPart();
   		}
   
  
  
  
  1.9       +2 -0      xml-xalan/c/src/xalanc/XSLT/XSLTResultTarget.hpp
  
  Index: XSLTResultTarget.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XSLT/XSLTResultTarget.hpp,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- XSLTResultTarget.hpp	8 Nov 2004 18:18:56 -0000	1.8
  +++ XSLTResultTarget.hpp	9 Nov 2004 16:06:06 -0000	1.9
  @@ -304,6 +304,8 @@
   
   private:
   
  +	XSLTResultTarget(const XSLTResultTarget&);
  +
   	XalanDOMString			m_fileName;
   
   	StreamType*				m_byteStream;
  
  
  
  1.12      +2 -1      xml-xalan/c/src/xalanc/XalanDOM/XalanDOMString.cpp
  
  Index: XalanDOMString.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XalanDOM/XalanDOMString.cpp,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- XalanDOMString.cpp	8 Nov 2004 18:12:23 -0000	1.11
  +++ XalanDOMString.cpp	9 Nov 2004 16:06:07 -0000	1.12
  @@ -642,6 +642,7 @@
   }
   
   template<class Type>
  +void
   reset_func(XalanDOMString& obj, MemoryManagerType&    theManager, Type string)
   {
       assert( string != 0 );
  @@ -1124,7 +1125,7 @@
   #if defined(XALAN_XALANDOMCHAR_USHORT_MISMATCH)
   		typedef XalanDOMString::WideCharVectorType	WideCharVectorType;
   
  -		WideCharVectorType	theTempResult;
  +		WideCharVectorType	theTempResult(theTargetVector.getMemoryManager());
   
   		theTempResult.resize(terminate == true ? theTargetLength + 1 : theTargetLength);
   
  
  
  
  1.11      +3 -0      xml-xalan/c/src/xalanc/XalanDOM/XalanDOMString.hpp
  
  Index: XalanDOMString.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XalanDOM/XalanDOMString.hpp,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- XalanDOMString.hpp	8 Nov 2004 18:12:23 -0000	1.10
  +++ XalanDOMString.hpp	9 Nov 2004 16:06:08 -0000	1.11
  @@ -26,6 +26,7 @@
   
   
   
  +#include <xalanc/Include/XalanMemoryManagement.hpp>
   #include <xalanc/Include/XalanVector.hpp>
   
   
  @@ -64,6 +65,7 @@
   
   	XalanDOMString(MemoryManagerType&  theManager);
   
  +
   	explicit
   	XalanDOMString(
   			const char*		    theString,
  @@ -1061,6 +1063,7 @@
   
   
   XALAN_USES_MEMORY_MANAGER(XalanDOMString)
  +
   
   
   XALAN_CPP_NAMESPACE_END
  
  
  
  1.6       +1 -1      xml-xalan/c/src/xalanc/XalanSourceTree/XalanSourceTreeDocumentFragment.hpp
  
  Index: XalanSourceTreeDocumentFragment.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XalanSourceTree/XalanSourceTreeDocumentFragment.hpp,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- XalanSourceTreeDocumentFragment.hpp	8 Nov 2004 19:15:38 -0000	1.5
  +++ XalanSourceTreeDocumentFragment.hpp	9 Nov 2004 16:06:08 -0000	1.6
  @@ -185,7 +185,7 @@
   	operator==(const XalanSourceTreeDocumentFragment&		theRHS) const;
   
   private:
  -    mutable MemoryManagerType&      m_manager;
  +    	MemoryManagerType&      m_manager;
   
   	XalanSourceTreeDocument* const	m_ownerDocument;
   
  
  
  
  1.19      +3 -2      xml-xalan/c/src/xalanc/XalanTransformer/XalanTransformer.cpp
  
  Index: XalanTransformer.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XalanTransformer/XalanTransformer.cpp,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- XalanTransformer.cpp	8 Nov 2004 19:20:04 -0000	1.18
  +++ XalanTransformer.cpp	9 Nov 2004 16:06:08 -0000	1.19
  @@ -250,6 +250,7 @@
       ICUBridgeCleanup::startup(theManager);
   }
   #else
  +void
   ICUStartUp(MemoryManagerType&  /*theManager*/)
   {
   }
  @@ -438,7 +439,7 @@
   				theSystemID == 0 ? &theDummy : theSystemID,
   				theException.getLineNumber(),
   				theException.getColumnNumber(),
  -				c_wstr(XALAN_STATIC_UCODE_STRING("SAXParseException")),
  +				c_wstr(XalanDOMString(XALAN_STATIC_UCODE_STRING("SAXParseException"), theErrorMessage.getMemoryManager())),
   				theErrorMessage);
   }
   
  @@ -679,7 +680,7 @@
   	{
   		m_compiledStylesheets.erase(i);
   
  -		theStylesheet ->~XalanCompiledStylesheet() ;
  +		const_cast<XalanCompiledStylesheet*>(theStylesheet) ->~XalanCompiledStylesheet() ;
   
           m_memoryManager.deallocate((void*) theStylesheet);
   		return 0;
  
  
  
  1.13      +8 -7      xml-xalan/c/src/xalanc/XalanTransformer/XalanTransformer.hpp
  
  Index: XalanTransformer.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/xalanc/XalanTransformer/XalanTransformer.hpp,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- XalanTransformer.hpp	8 Nov 2004 19:20:05 -0000	1.12
  +++ XalanTransformer.hpp	9 Nov 2004 16:06:08 -0000	1.13
  @@ -938,15 +938,15 @@
   	};
       template <class T>
   #if defined(XALAN_NO_STD_NAMESPACE)
  -    struct DeleteParamPairFunctor : public unary_function<const T&, void>
  +    struct DeleteParamPairFunctor : public unary_function<T&, void>
   #else
  -    struct DeleteParamPairFunctor : public std::unary_function<const T&, void>
  +    struct DeleteParamPairFunctor : public std::unary_function<T&, void>
   #endif
       {
   #if defined(XALAN_NO_STD_NAMESPACE)
  -        typedef unary_function<const T&, void>	BaseClassType;
  +        typedef unary_function<T&, void>	BaseClassType;
   #else
  -        typedef std::unary_function<const T&, void>	BaseClassType;
  +        typedef std::unary_function<T&, void>	BaseClassType;
   #endif
   
           typedef typename BaseClassType::result_type		result_type;
  @@ -957,10 +957,11 @@
           {
           }
   
  -        template<class T>
  -        deletePtr(T* ptr)const
  +        template<class PtrT>
  +	void
  +        deletePtr(PtrT* ptr)const
           {
  -            ptr->~T();
  +            ptr->~PtrT();
           }
   
           /**
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org