Differences From Artifact [7687a7a311]:
- File src/OFMutableDictionary.m — part of check-in [813c00ccf0] at 2013-01-09 22:24:47 on branch trunk — Update copyright. (user: js, size: 3482) [annotate] [blame] [check-ins using]
To Artifact [3f243b3679]:
- File
src/OFMutableDictionary.m
— part of check-in
[4fb0f4bf66]
at
2013-02-18 11:07:29
on branch trunk
— Add -[OFMutableDictionary initWithCapacity:].
This was already implemented in OFDictionary_hashtable for internal
usage and is now publicly available. (user: js, size: 3876) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
87 88 89 90 91 92 93 94 95 96 97 98 99 100 | } - initWithSerialization: (OFXMLElement*)element { return (id)[[OFMutableDictionary_hashtable alloc] initWithSerialization: element]; } - retain { return self; } - autorelease | > > > > > > | 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 | } - initWithSerialization: (OFXMLElement*)element { return (id)[[OFMutableDictionary_hashtable alloc] initWithSerialization: element]; } - initWithCapacity: (size_t)capacity { return (id)[[OFMutableDictionary_hashtable alloc] initWithCapacity: capacity]; } - retain { return self; } - autorelease |
︙ | ︙ | |||
126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 | + alloc { if (self == [OFMutableDictionary class]) return (id)&placeholder; return [super alloc]; } - init { if (object_getClass(self) == [OFMutableDictionary class]) { @try { [self doesNotRecognizeSelector: _cmd]; abort(); } @catch (id e) { [self release]; @throw e; } } return [super init]; } - (void)setObject: (id)object forKey: (id)key { [self doesNotRecognizeSelector: _cmd]; abort(); } | > > > > > > > > > > > > > > > > | 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 | + alloc { if (self == [OFMutableDictionary class]) return (id)&placeholder; return [super alloc]; } + dictionaryWithCapacity: (size_t)capacity { return [[[self alloc] initWithCapacity: capacity] autorelease]; } - init { if (object_getClass(self) == [OFMutableDictionary class]) { @try { [self doesNotRecognizeSelector: _cmd]; abort(); } @catch (id e) { [self release]; @throw e; } } return [super init]; } - initWithCapacity: (size_t)capacity { @try { [self doesNotRecognizeSelector: _cmd]; abort(); } @catch (id e) { [self release]; @throw e; } } - (void)setObject: (id)object forKey: (id)key { [self doesNotRecognizeSelector: _cmd]; abort(); } |
︙ | ︙ |