Differences From Artifact [ae861b76c6]:
- File
src/OFDictionary.m
— part of check-in
[139591afe1]
at
2009-04-19 20:34:38
on branch trunk
— Use isa instead of [self class].
Since we don't use Object anymore and define isa in OFObject, we can
rely on it. (user: js, size: 2742) [annotate] [blame] [check-ins using]
To Artifact [570b1e1aa5]:
- File src/OFDictionary.m — part of check-in [d87df02e8b] at 2009-04-21 17:16:23 on branch trunk — The if ((self = [super init])) construct isn't needed anymore. (user: js, size: 2691) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
25 26 27 28 29 30 31 | + dictionaryWithHashSize: (int)hashsize { return [[[OFDictionary alloc] initWithHashSize: hashsize] autorelease]; } - init { | | > | | | | | | | | | < | > | | | | | | | | | | | | | | | | < | 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 | + dictionaryWithHashSize: (int)hashsize { return [[[OFDictionary alloc] initWithHashSize: hashsize] autorelease]; } - init { self = [super init]; size = 4096; @try { data = [self getMemForNItems: size ofSize: sizeof(OFList*)]; } @catch (OFException *e) { [self free]; @throw e; } memset(data, 0, size); return self; } - initWithHashSize: (int)hashsize { self = [super init]; if (hashsize < 8 || hashsize > 31) { Class c = isa; [self free]; @throw [OFInvalidArgumentException newWithClass: c andSelector: _cmd]; } size = (size_t)1 << hashsize; @try { data = [self getMemForNItems: size ofSize: sizeof(OFList*)]; } @catch (OFException *e) { [self free]; @throw e; } memset(data, 0, size); return self; } - free { size_t i; |
︙ | ︙ |