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 | 0.5 |
Files: | files | file ages | folders |
SHA3-256: |
04d0e470007785be8f607e85efaf1f3c |
User & Date: | js on 2011-06-04 15:41:11 |
Other Links: | branch diff | manifest | tags |
Context
2011-06-04
| ||
16:30 | Also escape \r in -[stringByXMLEscaping]. check-in: 7d8ab5ba31 user: js tags: 0.5 | |
15:41 | Add -[hash] to OFDate, as it is required if there's -[isEqual:]. check-in: 04d0e47000 user: js tags: 0.5 | |
15:27 | Add missing include. check-in: eef1a8d4ad user: js tags: 0.5 | |
Changes
Modified src/OFDate.m from [d33bbd220e] to [00ea6c929d].
︙ | ︙ | |||
28 29 30 31 32 33 34 35 36 37 38 39 40 41 | #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 | > > | 28 29 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" #import "macros.h" #if (!defined(HAVE_GMTIME_R) || !defined(HAVE_LOCALTIME_R)) && \ defined(OF_THREADS) static OFMutex *mutex; #endif #ifdef HAVE_GMTIME_R |
︙ | ︙ | |||
243 244 245 246 247 248 249 250 251 252 253 254 255 256 | if (![obj isKindOfClass: [OFDate class]]) return NO; if (((OFDate*)obj)->sec != sec || ((OFDate*)obj)->usec != usec) return NO; return YES; } - copy { return [self retain]; } - (of_comparison_result_t)compare: (id)obj | > > > > > > > > > > > > > > > > > > > > > > > > > | 245 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 280 281 282 283 | if (![obj isKindOfClass: [OFDate class]]) return NO; if (((OFDate*)obj)->sec != sec || ((OFDate*)obj)->usec != usec) return NO; return YES; } - (uint32_t)hash { uint32_t hash; OF_HASH_INIT(hash); OF_HASH_ADD(hash, (sec >> 56) & 0xFF); OF_HASH_ADD(hash, (sec >> 48) & 0xFF); OF_HASH_ADD(hash, (sec >> 40) & 0xFF); OF_HASH_ADD(hash, (sec >> 32) & 0xFF); OF_HASH_ADD(hash, (sec >> 24) & 0xFF); OF_HASH_ADD(hash, (sec >> 16) & 0xFF); OF_HASH_ADD(hash, (sec >> 8) & 0xFF); OF_HASH_ADD(hash, sec & 0xFF); OF_HASH_ADD(hash, (usec >> 24) & 0xFF); OF_HASH_ADD(hash, (usec >> 16) & 0xFF); OF_HASH_ADD(hash, (usec >> 8) & 0xFF); OF_HASH_ADD(hash, usec & 0xFF); OF_HASH_FINALIZE(hash); return hash; } - copy { return [self retain]; } - (of_comparison_result_t)compare: (id)obj |
︙ | ︙ |