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
234
235
236
237
238
239
|
}
new->last = o;
return new;
}
/* FIXME: Implement!
- (uint32_t)hash
{
}
*/
@end
|
<
>
>
|
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
|
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
|