* Source/NSXMLNode.m (-XMLStringWithOptions:): Revert change I

made on 2012-12-01.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@36401 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2013-03-23 13:47:40 +00:00
parent 4c7b5c5726
commit 0b60eebda4
2 changed files with 13 additions and 6 deletions

View file

@ -1,4 +1,9 @@
2012-03-20 Richard Frith-Macdonald <rfm@gnu.org> 2013-03-23 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSXMLNode.m (-XMLStringWithOptions:): Revert change I
made on 2012-12-01.
2013-03-20 Richard Frith-Macdonald <rfm@gnu.org>
* Tests/base/NSCalendar/features-10-7.m: * Tests/base/NSCalendar/features-10-7.m:
* Source/NSCalendar.m: * Source/NSCalendar.m:
@ -6,7 +11,7 @@
New OSX 10.7 methods supplied by Lobos Dolezel and rewritten somewhat New OSX 10.7 methods supplied by Lobos Dolezel and rewritten somewhat
to avoid breaking binary compatibility. to avoid breaking binary compatibility.
2012-03-17 Richard Frith-Macdonald <rfm@gnu.org> 2013-03-17 Richard Frith-Macdonald <rfm@gnu.org>
* Source/GSSet.m: Some optimisation for set intersection. * Source/GSSet.m: Some optimisation for set intersection.

View file

@ -1986,6 +1986,11 @@ execute_xpath(xmlNodePtr node, NSString *xpath_exp, NSDictionary *constants,
int xmlOptions = 0; int xmlOptions = 0;
buffer = xmlBufferCreate(); buffer = xmlBufferCreate();
if (buffer == NULL)
{
// FIXME: xmlGetLastError()
return nil;
}
// XML_SAVE_XHTML XML_SAVE_AS_HTML XML_SAVE_NO_DECL XML_SAVE_NO_XHTML // XML_SAVE_XHTML XML_SAVE_AS_HTML XML_SAVE_NO_DECL XML_SAVE_NO_XHTML
#if LIBXML_VERSION >= 20702 #if LIBXML_VERSION >= 20702
@ -2035,11 +2040,8 @@ execute_xpath(xmlNodePtr node, NSString *xpath_exp, NSDictionary *constants,
xmlBufferFree(buffer); xmlBufferFree(buffer);
return nil; return nil;
} }
#if LIBXML_VERSION < 20900
string = StringFromXMLString(buffer->content, buffer->use); string = StringFromXMLString(buffer->content, buffer->use);
#else
string = StringFromXMLString(xmlBufContent(buffer), xmlBufUse(buffer));
#endif
xmlBufferFree(buffer); xmlBufferFree(buffer);
if ([self kind] == NSXMLTextKind) if ([self kind] == NSXMLTextKind)