Overview
Comment: | Add OF_HASH_ADD_INT{16,32,64}. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
871fcf6e0bb43b66d824f93d205fc903 |
User & Date: | js on 2011-06-04 16:02:44 |
Other Links: | manifest | tags |
Context
2011-06-04
| ||
16:07 | Add -[hash] to OFXMLElement and OFXMLAttribute. check-in: a698b98203 user: js tags: trunk | |
16:02 | Add OF_HASH_ADD_INT{16,32,64}. check-in: 871fcf6e0b user: js tags: trunk | |
15:40 | Add -[hash] to OFDate, as it is required if there's -[isEqual:]. check-in: eee0aa1848 user: js tags: trunk | |
Changes
Modified src/OFDate.m from [23de019f51] to [9790497193].
︙ | |||
300 301 302 303 304 305 306 | 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 | - - - - - - - - + - - - - - + | - (uint32_t)hash { uint32_t hash; OF_HASH_INIT(hash); |
︙ |
Modified src/OFURL.m from [72e6419d11] to [7b484f195b].
︙ | |||
28 29 30 31 32 33 34 | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 | - - - - - - - | #import "OFInvalidArgumentException.h" #import "OFInvalidFormatException.h" #import "OFOutOfMemoryException.h" #import "macros.h" |
︙ | |||
361 362 363 364 365 366 367 | 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 | - + - - - - - - + + + + - - - - - - + + + + + | return NO; return YES; } - (uint32_t)hash { |
︙ |
Modified src/macros.h from [d5e29a8d9f] to [93351baa39].
︙ | |||
246 247 248 249 250 251 252 253 | 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 | + + + + + + + + + + + + + + + + + + + + + + + + + + | hash ^= (hash >> 6); \ } #define OF_HASH_FINALIZE(hash) \ { \ hash += (hash << 3); \ hash ^= (hash >> 11); \ hash += (hash << 15); \ } #define OF_HASH_ADD_INT16(hash, int16) \ { \ uint16_t int16Copy = int16; \ OF_HASH_ADD(hash, int16Copy >> 8); \ OF_HASH_ADD(hash, int16Copy & 0xFF); \ } #define OF_HASH_ADD_INT32(hash, int32) \ { \ uint32_t int32Copy = int32; \ OF_HASH_ADD(hash, (int32Copy >> 24) & 0xFF); \ OF_HASH_ADD(hash, (int32Copy >> 16) & 0xFF); \ OF_HASH_ADD(hash, (int32Copy >> 8) & 0xFF); \ OF_HASH_ADD(hash, int32Copy & 0xFF); \ } #define OF_HASH_ADD_INT64(hash, int64) \ { \ uint64_t int64Copy = int64; \ OF_HASH_ADD(hash, (int64Copy >> 56) & 0xFF); \ OF_HASH_ADD(hash, (int64Copy >> 48) & 0xFF); \ OF_HASH_ADD(hash, (int64Copy >> 40) & 0xFF); \ OF_HASH_ADD(hash, (int64Copy >> 32) & 0xFF); \ OF_HASH_ADD(hash, (int64Copy >> 24) & 0xFF); \ OF_HASH_ADD(hash, (int64Copy >> 16) & 0xFF); \ OF_HASH_ADD(hash, (int64Copy >> 8) & 0xFF); \ OF_HASH_ADD(hash, int64Copy & 0xFF); \ } |