Borland workarounds submitted by Eric Britz

This commit is contained in:
jez_higgins 2005-12-07 16:09:37 +00:00
parent bc15f5eedf
commit 116385f350
3 changed files with 11 additions and 0 deletions

View file

@ -151,7 +151,12 @@ class Parser : protected SAX::basic_DefaultHandler2<stringT>
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<interfaceT&>(*this));
#else
parser.setProperty(propertyName, *(interfaceT*)this);
#endif
} // try
catch(SAX::SAXException&) { }
} // setParserProperty

View file

@ -408,6 +408,8 @@ void expat_wrapper<stringT, T0, T1>::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<stringT, T0, T1>::setFeature(const stringT& name, bool value)
os << "Feature not recognized " << SA::asStdString(name);
throw SAX::SAXNotRecognizedException(os.str());
}
#endif
} // setFeature
template<class stringT, class T0, class T1>

View file

@ -8,6 +8,9 @@
#include <DOM/Attr.h>
#include <boost/shared_ptr.hpp>
#include <boost/lexical_cast.hpp>
#ifdef __BORLANDC__
#include <math>
#endif
#include <cmath>
#include <Utils/StringAdaptor.h>
#include "xpath_axis_enumerator.hpp"