Overview
| Comment: | Don't require a regular file to init an object |
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA3-256: |
8471999204e8335daa4688236328f683 |
| User & Date: | js on 2023-08-22 16:16:00 |
| Other Links: | manifest | tags |
Context
|
2023-08-23
| ||
| 08:55 | OFApplication: Reduce scope of some variables (check-in: c7035e7dd2 user: js tags: trunk) | |
|
2023-08-22
| ||
| 16:16 | Don't require a regular file to init an object (check-in: 8471999204 user: js tags: trunk) | |
| 15:46 | Re-enable UNIX sockets on Hurd (check-in: 9b50999d63 user: js tags: trunk) | |
Changes
Modified src/OFData.m from [6b96716473] to [753e5c551b].
| ︙ | ︙ | |||
261 262 263 264 265 266 267 |
{
OF_INVALID_INIT_METHOD
}
#ifdef OF_HAVE_FILES
- (instancetype)initWithContentsOfFile: (OFString *)path
{
| < < < < | < < | < < < | < < | < < < < | < < < < < | > | 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 |
{
OF_INVALID_INIT_METHOD
}
#ifdef OF_HAVE_FILES
- (instancetype)initWithContentsOfFile: (OFString *)path
{
void *pool = objc_autoreleasePoolPush();
OFIRI *IRI;
@try {
IRI = [OFIRI fileIRIWithPath: path];
} @catch (id e) {
[self release];
@throw e;
}
self = [self initWithContentsOfIRI: IRI];
objc_autoreleasePoolPop(pool);
return self;
}
#endif
- (instancetype)initWithContentsOfIRI: (OFIRI *)IRI
{
|
| ︙ | ︙ |
Modified src/OFString.m from [ed5e3faeac] to [c29f20e2b2].
| ︙ | ︙ | |||
1021 1022 1023 1024 1025 1026 1027 |
return [self initWithContentsOfFile: path
encoding: OFStringEncodingUTF8];
}
- (instancetype)initWithContentsOfFile: (OFString *)path
encoding: (OFStringEncoding)encoding
{
| < < < < | < < | < < < < < < < < | < | < < < < < < < < < < < < < < < < < < | < < < < | < > | 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 |
return [self initWithContentsOfFile: path
encoding: OFStringEncodingUTF8];
}
- (instancetype)initWithContentsOfFile: (OFString *)path
encoding: (OFStringEncoding)encoding
{
void *pool = objc_autoreleasePoolPush();
OFIRI *IRI;
@try {
IRI = [OFIRI fileIRIWithPath: path];
} @catch (id e) {
[self release];
@throw e;
}
self = [self initWithContentsOfIRI: IRI encoding: encoding];
objc_autoreleasePoolPop(pool);
return self;
}
#endif
- (instancetype)initWithContentsOfIRI: (OFIRI *)IRI
{
|
| ︙ | ︙ |