352
353
354
355
356
357
358
359
360
361
362
363
364
365
|
length: *i - *last];
pi = [[cache mutableCopy] autorelease];
len = [pi length];
[pi removeCharactersFromIndex: len - 1
toIndex: len];
[delegate parser: self
foundProcessingInstructions: pi];
[pool release];
[cache setToCString: ""];
|
>
>
>
>
>
>
>
|
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
|
length: *i - *last];
pi = [[cache mutableCopy] autorelease];
len = [pi length];
[pi removeCharactersFromIndex: len - 1
toIndex: len];
/*
* Class swizzle the string to be immutable. We pass it as
* OFString*, so it can't be modified anyway. But not swizzling
* it would create a real copy each time -[copy] is called.
*/
pi->isa = [OFString class];
[delegate parser: self
foundProcessingInstructions: pi];
[pool release];
[cache setToCString: ""];
|
806
807
808
809
810
811
812
813
814
815
816
817
818
819
|
length: *i - *last];
cdata = [[cache mutableCopy] autorelease];
len = [cdata length];
[cdata removeCharactersFromIndex: len - 2
toIndex: len];
#if defined(OF_HAVE_PROPERTIES) && defined(OF_HAVE_BLOCKS)
if (CDATAHandler != NULL)
CDATAHandler(self, cdata);
else
#endif
[delegate parser: self
foundCDATA: cdata];
|
>
>
>
>
>
>
>
|
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
|
length: *i - *last];
cdata = [[cache mutableCopy] autorelease];
len = [cdata length];
[cdata removeCharactersFromIndex: len - 2
toIndex: len];
/*
* Class swizzle the string to be immutable. We pass it as OFString*, so
* it can't be modified anyway. But not swizzling it would create a
* real copy each time -[copy] is called.
*/
cdata->isa = [OFString class];
#if defined(OF_HAVE_PROPERTIES) && defined(OF_HAVE_BLOCKS)
if (CDATAHandler != NULL)
CDATAHandler(self, cdata);
else
#endif
[delegate parser: self
foundCDATA: cdata];
|
869
870
871
872
873
874
875
876
877
878
879
880
881
882
|
length: *i - *last];
comment = [[cache mutableCopy] autorelease];
len = [comment length];
[comment removeCharactersFromIndex: len - 2
toIndex: len];
#if defined(OF_HAVE_PROPERTIES) && defined(OF_HAVE_BLOCKS)
if (commentHandler != NULL)
commentHandler(self, comment);
else
#endif
[delegate parser: self
foundComment: comment];
|
>
>
>
>
>
>
>
|
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
|
length: *i - *last];
comment = [[cache mutableCopy] autorelease];
len = [comment length];
[comment removeCharactersFromIndex: len - 2
toIndex: len];
/*
* Class swizzle the string to be immutable. We pass it as OFString*, so
* it can't be modified anyway. But not swizzling it would create a
* real copy each time -[copy] is called.
*/
comment->isa = [OFString class];
#if defined(OF_HAVE_PROPERTIES) && defined(OF_HAVE_BLOCKS)
if (commentHandler != NULL)
commentHandler(self, comment);
else
#endif
[delegate parser: self
foundComment: comment];
|