Overview
Comment: | Add -[hash] to OFDate, as it is required if there's -[isEqual:]. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
eee0aa1848e39c86f3e7b5e3d8709019 |
User & Date: | js on 2011-06-04 15:40:39 |
Other Links: | manifest | tags |
Context
2011-06-04
| ||
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 | |
15:26 | Add missing include. check-in: e5017153bb user: js tags: trunk | |
Changes
Modified src/OFDate.m from [dd1167284f] to [23de019f51].
︙ | ︙ | |||
30 31 32 33 34 35 36 37 38 39 40 41 42 43 | #ifdef OF_THREADS # import "OFThread.h" #endif #import "OFInitializationFailedException.h" #import "OFInvalidArgumentException.h" #import "OFOutOfRangeException.h" #if (!defined(HAVE_GMTIME_R) || !defined(HAVE_LOCALTIME_R)) && \ defined(OF_THREADS) static OFMutex *mutex; #endif #ifdef HAVE_GMTIME_R | > > | 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | #ifdef OF_THREADS # import "OFThread.h" #endif #import "OFInitializationFailedException.h" #import "OFInvalidArgumentException.h" #import "OFOutOfRangeException.h" #import "macros.h" #if (!defined(HAVE_GMTIME_R) || !defined(HAVE_LOCALTIME_R)) && \ defined(OF_THREADS) static OFMutex *mutex; #endif #ifdef HAVE_GMTIME_R |
︙ | ︙ | |||
291 292 293 294 295 296 297 298 299 300 301 302 303 304 | if (otherDate->seconds != seconds || otherDate->microseconds != microseconds) return NO; return YES; } - copy { return [self retain]; } - (of_comparison_result_t)compare: (id)object | > > > > > > > > > > > > > > > > > > > > > > > > > | 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 | if (otherDate->seconds != seconds || otherDate->microseconds != microseconds) return NO; return YES; } - (uint32_t)hash { uint32_t hash; OF_HASH_INIT(hash); OF_HASH_ADD(hash, (seconds >> 56) & 0xFF); OF_HASH_ADD(hash, (seconds >> 48) & 0xFF); OF_HASH_ADD(hash, (seconds >> 40) & 0xFF); OF_HASH_ADD(hash, (seconds >> 32) & 0xFF); OF_HASH_ADD(hash, (seconds >> 24) & 0xFF); OF_HASH_ADD(hash, (seconds >> 16) & 0xFF); OF_HASH_ADD(hash, (seconds >> 8) & 0xFF); OF_HASH_ADD(hash, seconds & 0xFF); OF_HASH_ADD(hash, (microseconds >> 24) & 0xFF); OF_HASH_ADD(hash, (microseconds >> 16) & 0xFF); OF_HASH_ADD(hash, (microseconds >> 8) & 0xFF); OF_HASH_ADD(hash, microseconds & 0xFF); OF_HASH_FINALIZE(hash); return hash; } - copy { return [self retain]; } - (of_comparison_result_t)compare: (id)object |
︙ | ︙ |