Differences From Artifact [3ace3f34b9]:
- File
src/OFFile.m
— part of check-in
[2f4e0df8be]
at
2017-10-17 00:33:37
on branch trunk
— Do not use implicit method return types
Instead, explicitly declare them, as OF_ASSUME_NONNULL_{BEGIN,END} does
not apply to implicit return types. This means that after this commit,
all init methods have a nonnull return type, as they should have. (user: js, size: 10411) [annotate] [blame] [check-ins using]
To Artifact [653ec63148]:
- File src/OFFile.m — part of check-in [ec1ec2815d] at 2017-10-29 01:48:07 on branch trunk — Add +[OFFile fileWithURL:mode:] (user: js, size: 10897) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
25 26 27 28 29 30 31 32 | #include "unistd_wrapper.h" #ifdef HAVE_SYS_STAT_H # include <sys/stat.h> #endif #import "OFFile.h" #import "OFString.h" | > | | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | #include "unistd_wrapper.h" #ifdef HAVE_SYS_STAT_H # include <sys/stat.h> #endif #import "OFFile.h" #import "OFLocalization.h" #import "OFString.h" #import "OFURL.h" #import "OFInitializationFailedException.h" #import "OFInvalidArgumentException.h" #import "OFNotOpenException.h" #import "OFOpenItemFailedException.h" #import "OFOutOfMemoryException.h" #import "OFOutOfRangeException.h" |
︙ | ︙ | |||
178 179 180 181 182 183 184 185 186 187 188 189 190 191 | + (instancetype)fileWithPath: (OFString *)path mode: (OFString *)mode { return [[[self alloc] initWithPath: path mode: mode] autorelease]; } + (instancetype)fileWithHandle: (of_file_handle_t)handle { return [[[self alloc] initWithHandle: handle] autorelease]; } - (instancetype)init | > > > > > > > | 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 | + (instancetype)fileWithPath: (OFString *)path mode: (OFString *)mode { return [[[self alloc] initWithPath: path mode: mode] autorelease]; } + (instancetype)fileWithURL: (OFURL *)URL mode: (OFString *)mode { return [[[self alloc] initWithURL: URL mode: mode] autorelease]; } + (instancetype)fileWithHandle: (of_file_handle_t)handle { return [[[self alloc] initWithHandle: handle] autorelease]; } - (instancetype)init |
︙ | ︙ | |||
294 295 296 297 298 299 300 301 302 303 304 305 306 307 | @try { self = [self initWithHandle: handle]; } @catch (id e) { closeHandle(handle); @throw e; } return self; } - (instancetype)initWithHandle: (of_file_handle_t)handle { self = [super init]; | > > > > > > > > > > > > > > > > > > | 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 | @try { self = [self initWithHandle: handle]; } @catch (id e) { closeHandle(handle); @throw e; } return self; } - (instancetype)initWithURL: (OFURL *)URL mode: (OFString *)mode { @try { void *pool = objc_autoreleasePoolPush(); self = [self initWithPath: [URL fileSystemRepresentation] mode: mode]; objc_autoreleasePoolPop(pool); } @catch (id e) { [self release]; @throw e; } return self; } - (instancetype)initWithHandle: (of_file_handle_t)handle { self = [super init]; |
︙ | ︙ |