[cpp-xmltooling COMMIT] /branches/REL_1/xmltooling/AbstractComplexElement.cpp

noreply at shibboleth.net noreply at shibboleth.net
Fri Feb 10 20:29:36 GMT 2012


Author: scantor
Date: Fri Feb 10 20:29:36 2012
New Revision: 962

URL: http://svn.shibboleth.net/view/cpp-xmltooling?rev=962&view=rev
Log:
Fix legacy XMLString release call

Modified:
    branches/REL_1/xmltooling/AbstractComplexElement.cpp

Modified: branches/REL_1/xmltooling/AbstractComplexElement.cpp
URL: http://svn.shibboleth.net/view/cpp-xmltooling/branches/REL_1/xmltooling/AbstractComplexElement.cpp?rev=962&r1=961&r2=962&view=diff
==============================================================================
--- branches/REL_1/xmltooling/AbstractComplexElement.cpp (original)
+++ branches/REL_1/xmltooling/AbstractComplexElement.cpp Fri Feb 10 20:29:36 2012
@@ -54,10 +54,21 @@
 }
 
 AbstractComplexElement::~AbstractComplexElement() {
+#ifdef XMLTOOLING_XERCESC_HAS_XMLBYTE_RELEASE
+    static void (*release)(XMLCh**) = &XMLString::release;
+#else
     static void (*release)(XMLCh**,MemoryManager*) = &XMLString::release;
+#endif
 
     for_each(m_children.begin(), m_children.end(), cleanup<XMLObject>());
-    for_each(m_text.begin(), m_text.end(), lambda::bind(release, &_1, XMLPlatformUtils::fgMemoryManager));
+    for_each(m_text.begin(), m_text.end(),
+        lambda::bind(
+            release, &_1
+#ifndef XMLTOOLING_XERCESC_HAS_XMLBYTE_RELEASE
+            ,XMLPlatformUtils::fgMemoryManager
+#endif
+            )
+        );
 }
 
 bool AbstractComplexElement::hasChildren() const



More information about the commits mailing list