Overview
Comment: | Add -[hash] for OFList. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
eb67bc40fa4f48ad6cb3e14f5552797b |
User & Date: | js on 2009-11-13 18:29:25 |
Other Links: | manifest | tags |
Context
2009-11-13
| ||
18:42 | Add OFMutex(Lock|Unlock)FailedException and fix a few FIXMEs. check-in: 9a623a35d0 user: js tags: trunk | |
18:29 | Add -[hash] for OFList. check-in: eb67bc40fa user: js tags: trunk | |
14:30 | Add -[caseInsensitiveCompare:] and fix -[compare:]. check-in: 35fda90cf5 user: js tags: trunk | |
Changes
Modified src/OFList.m from [264d5fceca] to [7db0d8023f].
︙ | ︙ | |||
11 12 13 14 15 16 17 18 19 20 21 22 23 24 | #include "config.h" #include "assert.h" #import "OFList.h" #import "OFExceptions.h" @implementation OFList + list { return [[[self alloc] init] autorelease]; } | > | 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | #include "config.h" #include "assert.h" #import "OFList.h" #import "OFExceptions.h" #import "OFMacros.h" @implementation OFList + list { return [[[self alloc] init] autorelease]; } |
︙ | ︙ | |||
227 228 229 230 231 232 233 | } new->last = o; return new; } | < > > | > | > > > > > > > > > > > > > | 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 | } new->last = o; return new; } - (uint32_t)hash { of_list_object_t *iter; uint32_t hash; OF_HASH_INIT(hash); for (iter = first; iter != NULL; iter = iter->next) { uint32_t h = [iter->object hash]; OF_HASH_ADD(hash, h >> 24); OF_HASH_ADD(hash, (h >> 16) & 0xFF); OF_HASH_ADD(hash, (h >> 8) & 0xFF); OF_HASH_ADD(hash, h & 0xFF); } OF_HASH_FINALIZE(hash); return hash; } @end |