* Source/NSXMLNode.m (-XMLStringWithOptions:): Use macros for

versions of libxml2.


git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@35839 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Fred Kiefer 2012-12-01 15:22:04 +00:00
parent 9d42d3cea3
commit 93d6b3c135
2 changed files with 10 additions and 5 deletions

View file

@ -1,3 +1,8 @@
2012-12-01 Fred Kiefer <FredKiefer@gmx.de>
* Source/NSXMLNode.m (-XMLStringWithOptions:): Use macros for
versions of libxml2.
2012-11-28 Richard Frith-Macdonald <rfm@gnu.org>
* configure.ac: Fixup ICU test error

View file

@ -1981,10 +1981,8 @@ execute_xpath(xmlNodePtr node, NSString *xpath_exp, NSDictionary *constants,
- (NSString*) XMLStringWithOptions: (NSUInteger)theOptions
{
NSString *string = nil;
xmlChar *buf = NULL;
xmlBufferPtr buffer;
int error = 0;
int len = 0;
int xmlOptions = 0;
buffer = xmlBufferCreate();
@ -2037,9 +2035,11 @@ execute_xpath(xmlNodePtr node, NSString *xpath_exp, NSDictionary *constants,
xmlBufferFree(buffer);
return nil;
}
buf = buffer->content;
len = buffer->use;
string = StringFromXMLString(buf, len);
#if LIBXML_VERSION < 20900
string = StringFromXMLString(buffer->content, buffer->use);
#else
string = StringFromXMLString(xmlBufContent(buffer), xmlBufUse(buffer));
#endif
xmlBufferFree(buffer);
if ([self kind] == NSXMLTextKind)