Index: src/OFList.m ================================================================== --- src/OFList.m +++ src/OFList.m @@ -13,10 +13,11 @@ #include "assert.h" #import "OFList.h" #import "OFExceptions.h" +#import "OFMacros.h" @implementation OFList + list { return [[[self alloc] init] autorelease]; @@ -229,11 +230,26 @@ new->last = o; return new; } -/* FIXME: Implement! - (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