Differences From Artifact [6bb947808b]:
- File src/OFSet.m — part of check-in [9b2ca72edb] at 2011-09-13 00:09:39 on branch trunk — Fix a warning when compiling with clang. (user: js, size: 7398) [annotate] [blame] [check-ins using]
To Artifact [f6a72ae961]:
- File
src/OFSet.m
— part of check-in
[e1e7ffa903]
at
2011-09-22 23:25:42
on branch trunk
— Exceptions are now autoreleased.
This is safe as an "exception loop" can't happen, since if allocating
an exception fails, it throws an OFAllocFailedException which is
preallocated and can always be thrown.So, the worst case would be that an autorelease of an exception fails,
triggering an OFOutOfMemoryException for which there is no memory,
resulting in an OFAllocFailedException to be thrown. (user: js, size: 7448) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
81 82 83 84 85 86 87 | - (void)release { } - (void)dealloc { | | | | 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 | - (void)release { } - (void)dealloc { @throw [OFNotImplementedException exceptionWithClass: isa selector: _cmd]; [super dealloc]; /* Get rid of a stupid warning */ } @end @implementation OFSet + (void)initialize { |
︙ | ︙ | |||
135 136 137 138 139 140 141 | } - init { if (isa == [OFSet class]) { Class c = isa; [self release]; | | | | | | | | | | | | | | | | | | | | 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 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 | } - init { if (isa == [OFSet class]) { Class c = isa; [self release]; @throw [OFNotImplementedException exceptionWithClass: c selector: _cmd]; } return [super init]; } - initWithSet: (OFSet*)set { Class c = isa; [self release]; @throw [OFNotImplementedException exceptionWithClass: c selector: _cmd]; } - initWithArray: (OFArray*)array { Class c = isa; [self release]; @throw [OFNotImplementedException exceptionWithClass: c selector: _cmd]; } - (id)initWithObjects:(id)firstObject, ... { id ret; va_list arguments; va_start(arguments, firstObject); ret = [self initWithObject: firstObject arguments: arguments]; va_end(arguments); return ret; } - initWithObject: (id)firstObject arguments: (va_list)arguments { Class c = isa; [self release]; @throw [OFNotImplementedException exceptionWithClass: c selector: _cmd]; } - initWithSerialization: (OFXMLElement*)element { Class c = isa; [self release]; @throw [OFNotImplementedException exceptionWithClass: c selector: _cmd]; } - (size_t)count { @throw [OFNotImplementedException exceptionWithClass: isa selector: _cmd]; } - (BOOL)containsObject: (id)object { @throw [OFNotImplementedException exceptionWithClass: isa selector: _cmd]; } - (OFEnumerator*)objectEnumerator { @throw [OFNotImplementedException exceptionWithClass: isa selector: _cmd]; } - (int)countByEnumeratingWithState: (of_fast_enumeration_state_t*)state objects: (id*)objects count: (int)count { @throw [OFNotImplementedException exceptionWithClass: isa selector: _cmd]; } - (BOOL)isEqual: (id)object { OFSet *otherSet; if (![object isKindOfClass: [OFSet class]]) |
︙ | ︙ |