Differences From Artifact [8c5b52d99d]:
- File
src/OFString.m
— part of check-in
[e9d48d0beb]
at
2009-05-01 18:15:32
on branch trunk
— Call [super free] on error in init methods.
Reason is that - free might free stuff which is allocated during the
initialization, which might not be allocated when an error occurred. (user: js, size: 9078) [annotate] [blame] [check-ins using]
To Artifact [3003617042]:
- File
src/OFString.m
— part of check-in
[06ad922132]
at
2009-05-01 22:28:50
on branch trunk
— Work around a compiler bug that occurs on OS X.
It seems super has the wrong type (struct _objc_super*) inside a
@try block. (user: js, size: 9217) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
164 165 166 167 168 169 170 | @throw [OFInvalidEncodingException newWithClass: c]; } @try { string = [self allocWithSize: length + 1]; } @catch (OFException *e) { | > > > > > | | 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 | @throw [OFInvalidEncodingException newWithClass: c]; } @try { string = [self allocWithSize: length + 1]; } @catch (OFException *e) { /* * We can't use [super free] on OS X here. Compiler bug? * [self free] will do here as we don't reimplement * free. */ [self free]; @throw e; } memcpy(string, str, length + 1); } return self; } |
︙ | ︙ |