211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
|
[pool2 releaseObjects];
}
[ret replaceOccurrencesOfString: @"\n"
withString: @"\n\t"];
[ret appendString: @"\n)}"];
[pool release];
/*
* Class swizzle the string to be immutable. We declared the return type
* to be OFString*, so it can't be modified anyway. But not swizzling it
* would create a real copy each time -[copy] is called.
*/
ret->isa = [OFString class];
return ret;
}
- copy
{
return [[OFSet alloc] initWithSet: self];
}
|
>
>
<
<
<
<
<
<
|
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
|
[pool2 releaseObjects];
}
[ret replaceOccurrencesOfString: @"\n"
withString: @"\n\t"];
[ret appendString: @"\n)}"];
[ret makeImmutable];
[pool release];
return ret;
}
- copy
{
return [[OFSet alloc] initWithSet: self];
}
|
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
|
[dictionary enumerateKeysAndObjectsUsingBlock: ^ (id key, id object,
BOOL *stop) {
if (block(key))
[ret addObject: key];
}];
/*
* Class swizzle the set to be immutable. We declared the return type
* to be OFSet*, so it can't be modified anyway. But not swizzling it
* would create a real copy each time -[copy] is called.
*/
ret->isa = [OFSet class];
return ret;
}
#endif
@end
|
<
|
|
<
<
<
|
307
308
309
310
311
312
313
314
315
316
317
318
319
|
[dictionary enumerateKeysAndObjectsUsingBlock: ^ (id key, id object,
BOOL *stop) {
if (block(key))
[ret addObject: key];
}];
[ret makeImmutable];
return ret;
}
#endif
@end
|