ObjFW  Diff

Differences From Artifact [a3249dff8b]:

To Artifact [7614e5646f]:


148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
						  withLength: len];

				if ([cache length] > 0) {
					OFString *str;

					pool = [[OFAutoreleasePool alloc] init];
					str = transform_string(cache, self);
					str = [[str copy] autorelease];
					[delegate xmlParser: self
						foundString: str];
					[pool release];
				}

				[cache setToCString: ""];








<







148
149
150
151
152
153
154

155
156
157
158
159
160
161
						  withLength: len];

				if ([cache length] > 0) {
					OFString *str;

					pool = [[OFAutoreleasePool alloc] init];
					str = transform_string(cache, self);

					[delegate xmlParser: self
						foundString: str];
					[pool release];
				}

				[cache setToCString: ""];

451
452
453
454
455
456
457
458
459
460
461

462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
			break;
		case OF_XMLPARSER_IN_COMMENT_3:
			if (buf[i] == '-')
				state = OF_XMLPARSER_IN_COMMENT_4;
			break;
		case OF_XMLPARSER_IN_COMMENT_4:
			if (buf[i] == '-') {
				OFString *str;

				[cache appendCString: buf + last
					  withLength: i - last];


				pool = [[OFAutoreleasePool alloc] init];
				str = [OFMutableString
				    stringWithCString: [cache cString]
					       length: [cache length] - 1];
				[str removeLeadingAndTrailingWhitespaces];
				[delegate xmlParser: self
				       foundComment: str];
				[pool release];

				[cache setToCString: ""];

				last = i + 1;
				state = OF_XMLPARSER_EXPECT_CLOSE;
			} else







|



>


<
|
|
|

|







450
451
452
453
454
455
456
457
458
459
460
461
462
463

464
465
466
467
468
469
470
471
472
473
474
475
			break;
		case OF_XMLPARSER_IN_COMMENT_3:
			if (buf[i] == '-')
				state = OF_XMLPARSER_IN_COMMENT_4;
			break;
		case OF_XMLPARSER_IN_COMMENT_4:
			if (buf[i] == '-') {
				size_t cache_len;

				[cache appendCString: buf + last
					  withLength: i - last];
				cache_len = [cache length];

				pool = [[OFAutoreleasePool alloc] init];

				[cache removeCharactersFromIndex: cache_len - 1
							 toIndex: cache_len];
				[cache removeLeadingAndTrailingWhitespaces];
				[delegate xmlParser: self
				       foundComment: cache];
				[pool release];

				[cache setToCString: ""];

				last = i + 1;
				state = OF_XMLPARSER_EXPECT_CLOSE;
			} else