You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by db...@apache.org on 2002/10/03 07:58:53 UTC

cvs commit: xml-xalan/c/src/XercesParserLiaison XercesWrapperNavigator.cpp XercesWrapperNavigator.hpp

dbertoni    2002/10/02 22:58:53

  Modified:    c/src/XercesParserLiaison XercesWrapperNavigator.cpp
                        XercesWrapperNavigator.hpp
  Log:
  Check for null string.
  
  Revision  Changes    Path
  1.2       +12 -2     xml-xalan/c/src/XercesParserLiaison/XercesWrapperNavigator.cpp
  
  Index: XercesWrapperNavigator.cpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XercesParserLiaison/XercesWrapperNavigator.cpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XercesWrapperNavigator.cpp	3 Oct 2002 01:32:42 -0000	1.1
  +++ XercesWrapperNavigator.cpp	3 Oct 2002 05:58:53 -0000	1.2
  @@ -70,8 +70,11 @@
   
   
   
  +const XalanDOMString	XercesWrapperNavigator::s_emptyString;
  +
  +
   // I'm using this to distinguish between null nodes, which are valid, and
  -// an uninitialized cached node address.  This is probably bogus, and I'll
  +// an uninitialized cached node address.  This is pretty bogus, and I'll
   // probably just change this to 0, but this is experimental anyway...
   #if defined(XALAN_OLD_STYLE_CASTS)
   static XalanNode* const		invalidNodeAddress = (XalanNode*)1;
  @@ -259,5 +262,12 @@
   const XalanDOMString&
   XercesWrapperNavigator::getPooledString(const XMLCh*	theString) const
   {
  -	return m_ownerDocument->getPooledString(theString, XalanDOMString::length(theString));
  +	if (theString == 0)
  +	{
  +		return s_emptyString;
  +	}
  +	else
  +	{
  +		return m_ownerDocument->getPooledString(theString, XalanDOMString::length(theString));
  +	}
   }
  
  
  
  1.2       +2 -0      xml-xalan/c/src/XercesParserLiaison/XercesWrapperNavigator.hpp
  
  Index: XercesWrapperNavigator.hpp
  ===================================================================
  RCS file: /home/cvs/xml-xalan/c/src/XercesParserLiaison/XercesWrapperNavigator.hpp,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- XercesWrapperNavigator.hpp	3 Oct 2002 01:32:42 -0000	1.1
  +++ XercesWrapperNavigator.hpp	3 Oct 2002 05:58:53 -0000	1.2
  @@ -245,6 +245,8 @@
   	mutable	XalanNode*			m_lastChild;
   
   	unsigned long				m_index;
  +
  +	const static XalanDOMString	s_emptyString;
   };
   
   
  
  
  

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