Overview
Comment: | Make dictionary literals work. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
6428a08de1ffa1efdb35970686001732 |
User & Date: | js on 2012-03-12 12:18:20 |
Other Links: | manifest | tags |
Context
2012-03-12
| ||
12:58 | OFHTTPRequest: Always close the connection after we received everything. check-in: 77b8ffc1e0 user: js tags: trunk | |
12:18 | Make dictionary literals work. check-in: 6428a08de1 user: js tags: trunk | |
12:14 | Add +[OFDictionary dictionaryWithObjects:forKeys:count:]. check-in: d42a56787b user: js tags: trunk | |
Changes
Modified src/OFDictionary.h from [7d0cda50b6] to [03d734b6a0].
︙ | ︙ | |||
180 181 182 183 184 185 186 187 188 189 190 191 192 193 | * The returned object is <i>not</i> retained and autoreleased for performance * reasons! * * \param key The key whose object should be returned * \return The object for the given key or nil if the key was not found */ - (id)objectForKey: (id)key; /** * \brief Checks whether the dictionary contains an object with the specified * address. * * \param object The object which is checked for being in the dictionary * \return A boolean whether the dictionary contains an object with the | > | 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 | * The returned object is <i>not</i> retained and autoreleased for performance * reasons! * * \param key The key whose object should be returned * \return The object for the given key or nil if the key was not found */ - (id)objectForKey: (id)key; - (id)objectForKeyedSubscript: (id)key; /** * \brief Checks whether the dictionary contains an object with the specified * address. * * \param object The object which is checked for being in the dictionary * \return A boolean whether the dictionary contains an object with the |
︙ | ︙ | |||
249 250 251 252 253 254 255 | #if defined(OF_SET_M) || defined(OF_COUNTED_SET_M) - _initWithDictionary: (OFDictionary*)dictionary copyKeys: (BOOL)copyKeys; #endif @end #import "OFMutableDictionary.h" | > > > > > | 250 251 252 253 254 255 256 257 258 259 260 261 | #if defined(OF_SET_M) || defined(OF_COUNTED_SET_M) - _initWithDictionary: (OFDictionary*)dictionary copyKeys: (BOOL)copyKeys; #endif @end #import "OFMutableDictionary.h" #ifndef NSINTEGER_DEFINED /* Required for dictionary literals to work */ @compatibility_alias NSDictionary OFDictionary; #endif |
Modified src/OFDictionary.m from [150bd32bb7] to [d4934d5b93].
︙ | ︙ | |||
254 255 256 257 258 259 260 261 262 263 264 265 266 267 | } - (id)objectForKey: (id)key { @throw [OFNotImplementedException exceptionWithClass: isa selector: _cmd]; } - (size_t)count { @throw [OFNotImplementedException exceptionWithClass: isa selector: _cmd]; } | > > > > > | 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 | } - (id)objectForKey: (id)key { @throw [OFNotImplementedException exceptionWithClass: isa selector: _cmd]; } - (id)objectForKeyedSubscript: (id)key { return [self objectForKey: key]; } - (size_t)count { @throw [OFNotImplementedException exceptionWithClass: isa selector: _cmd]; } |
︙ | ︙ |
Modified src/OFMutableDictionary.h from [513d866e37] to [e2f5552214].
︙ | ︙ | |||
30 31 32 33 34 35 36 37 38 39 40 41 42 43 | * A key can be any object that conforms to the OFCopying protocol. * * \param key The key to set * \param object The object to set the key to */ - (void)setObject: (id)object forKey: (id)key; /** * \brief Removes the object for the specified key from the dictionary. * * \param key The key whose object should be removed */ - (void)removeObjectForKey: (id)key; | > > | 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | * A key can be any object that conforms to the OFCopying protocol. * * \param key The key to set * \param object The object to set the key to */ - (void)setObject: (id)object forKey: (id)key; - (void)setObject: (id)object forKeyedSubscript: (id)key; /** * \brief Removes the object for the specified key from the dictionary. * * \param key The key whose object should be removed */ - (void)removeObjectForKey: (id)key; |
︙ | ︙ |
Modified src/OFMutableDictionary.m from [09218a8546] to [9331cf055e].
︙ | ︙ | |||
144 145 146 147 148 149 150 151 152 153 154 155 156 157 | - (void)setObject: (id)object forKey: (id)key { @throw [OFNotImplementedException exceptionWithClass: isa selector: _cmd]; } - (void)removeObjectForKey: (id)key { @throw [OFNotImplementedException exceptionWithClass: isa selector: _cmd]; } | > > > > > > > | 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 | - (void)setObject: (id)object forKey: (id)key { @throw [OFNotImplementedException exceptionWithClass: isa selector: _cmd]; } - (void)setObject: (id)object forKeyedSubscript: (id)key { [self setObject: object forKey: key]; } - (void)removeObjectForKey: (id)key { @throw [OFNotImplementedException exceptionWithClass: isa selector: _cmd]; } |
︙ | ︙ |