Differences From Artifact [fe0918c4c9]:
- File
src/OFData.m
— part of check-in
[aeb403a1ed]
at
2020-10-10 14:27:37
on branch trunk
— OFObject: Change type of -[hash] to unsigned long
The internal hash is still 32 bit in most places, but this way, it is at
least not baked into the API and ABI and can be upgraded later, should
that ever be necessary. (user: js, size: 14787) [annotate] [blame] [check-ins using]
To Artifact [bf7091f2d8]:
- File src/OFData.m — part of check-in [d0ae3bfd6c] at 2020-10-25 23:33:09 on branch trunk — Add of_{malloc,calloc,realloc,free} (user: js, size: 14703) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
193 194 195 196 197 198 199 | attributesOfItemAtPath: path].fileSize; # if ULLONG_MAX > SIZE_MAX if (size > SIZE_MAX) @throw [OFOutOfRangeException exception]; # endif | < < < | | | | 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 | attributesOfItemAtPath: path].fileSize; # if ULLONG_MAX > SIZE_MAX if (size > SIZE_MAX) @throw [OFOutOfRangeException exception]; # endif buffer = of_malloc(1, (size_t)size); file = [[OFFile alloc] initWithPath: path mode: @"r"]; @try { [file readIntoBuffer: buffer exactLength: (size_t)size]; } @finally { [file release]; } } @catch (id e) { of_free(buffer); [self release]; @throw e; } @try { self = [self initWithItemsNoCopy: buffer count: (size_t)size freeWhenDone: true]; } @catch (id e) { of_free(buffer); @throw e; } return self; } #endif |
︙ | ︙ | |||
379 380 381 382 383 384 385 | return self; } - (void)dealloc { if (_freeWhenDone) | | | 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 | return self; } - (void)dealloc { if (_freeWhenDone) of_free(_items); [_parentData release]; [super dealloc]; } - (size_t)count |
︙ | ︙ |