27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
-
-
-
-
-
|
#import "OFMutableString.h"
#import "OFExceptions.h"
#import "OFMacros.h"
#import "asprintf.h"
@implementation OFMutableString
- (id)copy
{
return [[OFString alloc] initWithString: self];
}
- setToCString: (const char*)str
{
size_t len;
if (string != NULL)
[self freeMemory: string];
|
392
393
394
395
396
397
398
399
|
387
388
389
390
391
392
393
394
395
396
397
398
399
|
+
+
+
+
+
|
} @catch (OFOutOfMemoryException *e) {
/* We don't really care, as we only made it smaller */
[e dealloc];
}
return self;
}
- (id)copy
{
return [[OFString alloc] initWithString: self];
}
@end
|