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 2008/09/01 21:26:56 UTC
svn commit: r691036 - in /xalan/c/trunk/src/xalanc:
Include/XalanObjectCache.hpp PlatformSupport/DOMStringHelper.cpp
XMLSupport/FormatterToXMLUnicode.hpp XSLT/FunctionDocument.cpp
Author: dbertoni
Date: Mon Sep 1 12:26:55 2008
New Revision: 691036
URL: http://svn.apache.org/viewvc?rev=691036&view=rev
Log:
Major error reporting cleanup.
Modified:
xalan/c/trunk/src/xalanc/Include/XalanObjectCache.hpp
xalan/c/trunk/src/xalanc/PlatformSupport/DOMStringHelper.cpp
xalan/c/trunk/src/xalanc/XMLSupport/FormatterToXMLUnicode.hpp
xalan/c/trunk/src/xalanc/XSLT/FunctionDocument.cpp
Modified: xalan/c/trunk/src/xalanc/Include/XalanObjectCache.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/Include/XalanObjectCache.hpp?rev=691036&r1=691035&r2=691036&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/Include/XalanObjectCache.hpp (original)
+++ xalan/c/trunk/src/xalanc/Include/XalanObjectCache.hpp Mon Sep 1 12:26:55 2008
@@ -40,15 +40,14 @@
public:
ObjectType*
- operator()(MemoryManagerType& theManager) const
+ operator()(MemoryManager& theManager) const
{
typedef ObjectType ThisType;
-
- XalanMemMgrAutoPtr<ThisType, false> theGuard( theManager , (ThisType*)theManager.allocate(sizeof(ThisType)));
- ThisType* theResult = theGuard.get();
+ XalanAllocationGuard theGuard(theManager, theManager.allocate(sizeof(ThisType)));
- new (theResult) ThisType();
+ ThisType* const theResult =
+ new (theGuard.get()) ThisType();
theGuard.release();
@@ -57,21 +56,21 @@
};
+
template<class ObjectType>
class DefaultCacheCreateFunctorMemMgr
{
public:
ObjectType*
- operator()(MemoryManagerType& theManager) const
+ operator()(MemoryManager& theManager) const
{
typedef ObjectType ThisType;
-
- XalanMemMgrAutoPtr<ThisType, false> theGuard( theManager , (ThisType*)theManager.allocate(sizeof(ThisType)));
- ThisType* theResult = theGuard.get();
+ XalanAllocationGuard theGuard(theManager, theManager.allocate(sizeof(ThisType)));
- new (theResult) ThisType(theManager);
+ ThisType* const theResult =
+ new (theGuard.get()) ThisType(theManager);
theGuard.release();
@@ -80,6 +79,7 @@
};
+
template<class ObjectType>
class DefaultCacheResetFunctor
{
Modified: xalan/c/trunk/src/xalanc/PlatformSupport/DOMStringHelper.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/PlatformSupport/DOMStringHelper.cpp?rev=691036&r1=691035&r2=691036&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/PlatformSupport/DOMStringHelper.cpp (original)
+++ xalan/c/trunk/src/xalanc/PlatformSupport/DOMStringHelper.cpp Mon Sep 1 12:26:55 2008
@@ -754,6 +754,9 @@
const Type* theRHS,
FunctionType theTransformFunction)
{
+ assert(theLHS != 0);
+ assert(theRHS != 0);
+
size_t i = 0;
Type theLHSChar;
@@ -764,7 +767,7 @@
theLHSChar = theTransformFunction(theLHS[i]);
theRHSChar = theTransformFunction(theRHS[i]);
- if (theLHS == static_cast<Type>(0) ||
+ if (theLHSChar == static_cast<Type>(0) ||
theLHSChar != theRHSChar)
{
break;
Modified: xalan/c/trunk/src/xalanc/XMLSupport/FormatterToXMLUnicode.hpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XMLSupport/FormatterToXMLUnicode.hpp?rev=691036&r1=691035&r2=691036&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XMLSupport/FormatterToXMLUnicode.hpp (original)
+++ xalan/c/trunk/src/xalanc/XMLSupport/FormatterToXMLUnicode.hpp Mon Sep 1 12:26:55 2008
@@ -108,7 +108,7 @@
static FormatterToXMLUnicode*
create(
- MemoryManagerType& theManager,
+ MemoryManager& theManager,
Writer& writer,
const XalanDOMString& encoding,
const XalanDOMString& doctypeSystem = s_emptyString,
@@ -120,19 +120,18 @@
typedef FormatterToXMLUnicode ThisType;
- XalanMemMgrAutoPtr<ThisType, false> theGuard( theManager , (ThisType*)theManager.allocate(sizeof(ThisType)));
+ XalanAllocationGuard theGuard(theManager, theManager.allocate(sizeof(ThisType)));
- ThisType* theResult = theGuard.get();
-
- new (theResult) ThisType(
- theManager,
- writer,
- encoding,
- doctypeSystem,
- doctypePublic,
- xmlDecl,
- standalone,
- indent);
+ ThisType* const theResult =
+ new (theGuard.get()) ThisType(
+ theManager,
+ writer,
+ encoding,
+ doctypeSystem,
+ doctypePublic,
+ xmlDecl,
+ standalone,
+ indent);
theGuard.release();
Modified: xalan/c/trunk/src/xalanc/XSLT/FunctionDocument.cpp
URL: http://svn.apache.org/viewvc/xalan/c/trunk/src/xalanc/XSLT/FunctionDocument.cpp?rev=691036&r1=691035&r2=691036&view=diff
==============================================================================
--- xalan/c/trunk/src/xalanc/XSLT/FunctionDocument.cpp (original)
+++ xalan/c/trunk/src/xalanc/XSLT/FunctionDocument.cpp Mon Sep 1 12:26:55 2008
@@ -19,8 +19,8 @@
-#include "xercesc/SAX/ErrorHandler.hpp"
-#include "xercesc/SAX/SAXParseException.hpp"
+#include "xercesc/sax/ErrorHandler.hpp"
+#include "xercesc/sax/SAXParseException.hpp"
---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org