Differences From Artifact [589715e608]:
- File src/OFDataArray.m — part of check-in [7fa61023b9] at 2009-05-18 18:52:56 on branch trunk — - copy and - mutableCopy should never autorelease. (user: js, size: 4748) [annotate] [blame] [check-ins using]
To Artifact [2e56b1156a]:
- File
src/OFDataArray.m
— part of check-in
[a29d403286]
at
2009-05-23 16:50:44
on branch trunk
— A few renames in OFArray, OFDataArray and OFDictionary.
OFArray:
* Rename - object: to - objectAtIndex:.OFDataArray:
* Rename - item: to - itemAtIndex:.OFDictionary:
* Rename - get: to - objectForKey:.
* Rename - set:to: to - setObject:forKey:.
* Rename - remove: to - removeObjectForKey:. (user: js, size: 4769) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
59 60 61 62 63 64 65 | } - (void*)data { return data; } | | | 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 | } - (void*)data { return data; } - (void*)itemAtIndex: (size_t)index { if (index >= count) @throw [OFOutOfRangeException newWithClass: isa]; return data + index * itemsize; } |
︙ | ︙ | |||
155 156 157 158 159 160 161 | if ([obj count] == count) return memcmp(data, [obj data], count * itemsize); if (count > [obj count]) { if ((ret = memcmp(data, [obj data], [obj count] * itemsize))) return ret; | | | | 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 | if ([obj count] == count) return memcmp(data, [obj data], count * itemsize); if (count > [obj count]) { if ((ret = memcmp(data, [obj data], [obj count] * itemsize))) return ret; return *(char*)[self itemAtIndex: [obj count]]; } else { if ((ret = memcmp(data, [obj data], count * itemsize))) return ret; return *(char*)[obj itemAtIndex: count] * -1; } } - (uint32_t)hash { uint32_t hash; size_t i; |
︙ | ︙ |