Index: src/OFXMLParser.h ================================================================== --- src/OFXMLParser.h +++ src/OFXMLParser.h @@ -199,11 +199,11 @@ * * \param buffer The buffer to parse * \param length The length of the buffer */ - (void)parseBuffer: (const char*)buffer - withLength: (size_t)length; + length: (size_t)length; /** * \brief Parses the specified string. * * \param string The string to parse Index: src/OFXMLParser.m ================================================================== --- src/OFXMLParser.m +++ src/OFXMLParser.m @@ -233,11 +233,11 @@ { delegate = delegate_; } - (void)parseBuffer: (const char*)buffer - withLength: (size_t)length + length: (size_t)length { size_t i, last = 0; for (i = 0; i < length; i++) { size_t j = i; @@ -261,11 +261,11 @@ } - (void)parseString: (OFString*)string { [self parseBuffer: [string UTF8String] - withLength: [string UTF8StringLength]]; + length: [string UTF8StringLength]]; } - (void)parseStream: (OFStream*)stream { char *buffer = [self allocMemoryWithSize: of_pagesize]; @@ -274,11 +274,11 @@ while (![stream isAtEndOfStream]) { size_t length = [stream readNBytes: of_pagesize intoBuffer: buffer]; [self parseBuffer: buffer - withLength: length]; + length: length]; } } @finally { [self freeMemory: buffer]; } } Index: tests/OFXMLParserTests.m ================================================================== --- tests/OFXMLParserTests.m +++ tests/OFXMLParserTests.m @@ -351,14 +351,14 @@ if ([parser finishedParsing]) abort(); if (j + 2 > len) [parser parseBuffer: str + j - withLength: 1]; + length: 1]; else [parser parseBuffer: str + j - withLength: 2]; + length: 2]; } TEST(@"Checking if everything was parsed", i == 32 && [parser lineNumber] == 18)