Fix legacy XMLString release call
authorScott Cantor <cantor.2@osu.edu>
Fri, 10 Feb 2012 20:19:22 +0000 (20:19 +0000)
committerScott Cantor <cantor.2@osu.edu>
Fri, 10 Feb 2012 20:19:22 +0000 (20:19 +0000)
xmltooling/AbstractAttributeExtensibleXMLObject.cpp

index 1f819f6..a89d8a1 100644 (file)
@@ -112,13 +112,19 @@ AbstractAttributeExtensibleXMLObject::AbstractAttributeExtensibleXMLObject(const
 
 AbstractAttributeExtensibleXMLObject::~AbstractAttributeExtensibleXMLObject()
 {
+#ifdef XMLTOOLING_XERCESC_HAS_XMLBYTE_RELEASE
+    static void (*release)(XMLCh**) = &XMLString::release;
+#else
     static void (*release)(XMLCh**,MemoryManager*) = &XMLString::release;
+#endif
     for_each(
         m_attributeMap.begin(), m_attributeMap.end(),
         lambda::bind(
             release,
-            &lambda::bind(&map<xmltooling::QName,XMLCh*>::value_type::second, boost::ref(_1)),
-            XMLPlatformUtils::fgMemoryManager
+            &lambda::bind(&map<xmltooling::QName,XMLCh*>::value_type::second, boost::ref(_1))
+#ifndef XMLTOOLING_XERCESC_HAS_XMLBYTE_RELEASE
+            ,XMLPlatformUtils::fgMemoryManager
+#endif
             )
         );
 }