11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
#include "config.h"
#include <stdarg.h>
#import "OFArray.h"
#import "OFExceptions.h"
@implementation OFArray
+ array
{
return [[[self alloc] init] autorelease];
}
|
>
|
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#include "config.h"
#include <stdarg.h>
#import "OFArray.h"
#import "OFExceptions.h"
#import "OFMacros.h"
@implementation OFArray
+ array
{
return [[[self alloc] init] autorelease];
}
|
228
229
230
231
232
233
234
235
236
237
238
239
240
|
- removeNObjects: (size_t)nobjects
{
@throw [OFNotImplementedException newWithClass: isa
selector: _cmd];
}
/* FIXME: Implement!
- (uint32_t)hash
{
}
*/
@end
|
<
>
>
>
|
>
|
>
>
>
>
>
>
>
>
>
>
>
>
>
|
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
256
257
|
- removeNObjects: (size_t)nobjects
{
@throw [OFNotImplementedException newWithClass: isa
selector: _cmd];
}
- (uint32_t)hash
{
OFObject **carray = [array cArray];
size_t i, count = [array count];
uint32_t hash;
OF_HASH_INIT(hash);
for (i = 0; i < count; i++) {
uint32_t h = [carray[i] 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
|