From 116385f350609bd9db4c3b989516f440e9dbdf45 Mon Sep 17 00:00:00 2001 From: jez_higgins <> Date: Wed, 7 Dec 2005 16:09:37 +0000 Subject: [PATCH] Borland workarounds submitted by Eric Britz --- DOM/SAX2DOM/SAX2DOM.h | 5 +++++ SAX/wrappers/saxexpat.h | 3 +++ XPath/impl/xpath_object.hpp | 3 +++ 3 files changed, 11 insertions(+) diff --git a/DOM/SAX2DOM/SAX2DOM.h b/DOM/SAX2DOM/SAX2DOM.h index 82d286f2..b17baf2b 100644 --- a/DOM/SAX2DOM/SAX2DOM.h +++ b/DOM/SAX2DOM/SAX2DOM.h @@ -151,7 +151,12 @@ class Parser : protected SAX::basic_DefaultHandler2 void setParserProperty(SAX_parser& parser, const stringT& propertyName) { try { +#ifndef __BORLANDC__ + // this line causes a crash with BCB 6 => may be a compiler bug parser.setProperty(propertyName, static_cast(*this)); +#else + parser.setProperty(propertyName, *(interfaceT*)this); +#endif } // try catch(SAX::SAXException&) { } } // setParserProperty diff --git a/SAX/wrappers/saxexpat.h b/SAX/wrappers/saxexpat.h index 48686a8d..fad36dd1 100644 --- a/SAX/wrappers/saxexpat.h +++ b/SAX/wrappers/saxexpat.h @@ -408,6 +408,8 @@ void expat_wrapper::setFeature(const stringT& name, bool value) return; } // external entity resolution +#ifndef __BORLANDC__ +// this is a hack features validation problem with BCB6 => need to be investigated if(name == features_.validation) { std::ostringstream os; @@ -420,6 +422,7 @@ void expat_wrapper::setFeature(const stringT& name, bool value) os << "Feature not recognized " << SA::asStdString(name); throw SAX::SAXNotRecognizedException(os.str()); } +#endif } // setFeature template diff --git a/XPath/impl/xpath_object.hpp b/XPath/impl/xpath_object.hpp index e4cc8654..8cc922f6 100644 --- a/XPath/impl/xpath_object.hpp +++ b/XPath/impl/xpath_object.hpp @@ -8,6 +8,9 @@ #include #include #include +#ifdef __BORLANDC__ +#include +#endif #include #include #include "xpath_axis_enumerator.hpp"