Differences From Artifact [b1dd678aec]:
- File
src/OFFile.m
— part of check-in
[49859c2bcc]
at
2008-10-29 17:29:49
on branch trunk
— Add getMemForNItems:withSize: & resizeMem:toNItems:withSize: in OFObject
Additionally, interface for OFArray. (user: js, size: 2651) [annotate] [blame] [check-ins using]
To Artifact [6b6d44b5bf]:
- File src/OFFile.m — part of check-in [9944a6f8a4] at 2008-11-01 22:20:33 on branch trunk — Some exception stuff & withSize -> ofSize for OFObject. (user: js, size: 2614) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
63 64 65 66 67 68 69 | return symlink(src, dest); } - initWithPath: (const char*)path andMode: (const char*)mode { if ((self = [super init])) { | | < < < | 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | return symlink(src, dest); } - initWithPath: (const char*)path andMode: (const char*)mode { if ((self = [super init])) { if ((fp = fopen(path, mode)) == NULL) [[OFOpenFileFailedException newWithObject: self andPath: path andMode: mode] raise]; } return self; } - free { fclose(fp); |
︙ | ︙ | |||
105 106 107 108 109 110 111 | - (uint8_t*)readWithSize: (size_t)size andNItems: (size_t)nitems { uint8_t *ret; ret = [self getMemForNItems: nitems | | | 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 | - (uint8_t*)readWithSize: (size_t)size andNItems: (size_t)nitems { uint8_t *ret; ret = [self getMemForNItems: nitems ofSize: size]; @try { [self readIntoBuffer: ret withSize: size andNItems: nitems]; } @catch (OFReadFailedException *e) { [self freeMem: ret]; |
︙ | ︙ |