Differences From Artifact [514dff27bb]:
- File
src/OFMutableURL.m
— part of check-in
[0f995db06d]
at
2017-10-28 21:08:37
on branch trunk
— Make OFURL more generic
This removes the special handling dependent on the scheme. (user: js, size: 2086) [annotate] [blame] [check-ins using]
To Artifact [5d3d519f50]:
- File src/OFMutableURL.m — part of check-in [7f64141183] at 2017-10-29 13:37:03 on branch trunk — Add -[OFURL pathComponents] (user: js, size: 2570) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
13 14 15 16 17 18 19 | * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #include "config.h" #import "OFMutableURL.h" | | > > > | 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | * LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this * file. */ #include "config.h" #import "OFMutableURL.h" #import "OFArray.h" #import "OFNumber.h" #import "OFString.h" #import "OFURL+Private.h" #import "OFInvalidFormatException.h" @implementation OFMutableURL @dynamic scheme, host, port, user, password, path, parameters, query, fragment; + (instancetype)URL { return [[[self alloc] init] autorelease]; |
︙ | ︙ | |||
92 93 94 95 96 97 98 99 100 101 102 103 104 105 | - (void)setFragment: (OFString *)fragment { OFString *old = _fragment; _fragment = [fragment copy]; [old release]; } - (id)copy { OFMutableURL *copy = [self mutableCopy]; [copy makeImmutable]; | > > > > > > > > > > > > > > > > > > > > | 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 | - (void)setFragment: (OFString *)fragment { OFString *old = _fragment; _fragment = [fragment copy]; [old release]; } - (void)setPathComponents: (OFArray *)components { void *pool = objc_autoreleasePoolPush(); if (components == nil) { [self setPath: nil]; return; } if ([components count] == 0) @throw [OFInvalidFormatException exception]; if ([[components firstObject] length] != 0) @throw [OFInvalidFormatException exception]; [self setPath: [components componentsJoinedByString: @"/"]]; objc_autoreleasePoolPop(pool); } - (id)copy { OFMutableURL *copy = [self mutableCopy]; [copy makeImmutable]; |
︙ | ︙ |