Differences From Artifact [744ee14c6a]:
- File src/OFData.m — part of check-in [615a9f2eba] at 2017-11-19 12:56:14 on branch trunk — Fix compilation with GCC (user: js, size: 12427) [annotate] [blame] [check-ins using]
To Artifact [d98f273881]:
- File
src/OFData.m
— part of check-in
[6cf7d6c33e]
at
2017-11-26 14:29:40
on branch trunk
— OFData: Change no copy handling
OFMutableData supports no copy now by just copying anyway and freeing if
required. (user: js, size: 12403) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
65 66 67 68 69 70 71 | count: (size_t)count { return [[[self alloc] initWithItems: items itemSize: itemSize count: count] autorelease]; } | | | | 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 | count: (size_t)count { return [[[self alloc] initWithItems: items itemSize: itemSize count: count] autorelease]; } + (instancetype)dataWithItemsNoCopy: (void *)items count: (size_t)count freeWhenDone: (bool)freeWhenDone { return [[[self alloc] initWithItemsNoCopy: items count: count freeWhenDone: freeWhenDone] autorelease]; } + (instancetype)dataWithItemsNoCopy: (void *)items itemSize: (size_t)itemSize count: (size_t)count freeWhenDone: (bool)freeWhenDone { return [[[self alloc] initWithItemsNoCopy: items itemSize: itemSize count: count |
︙ | ︙ | |||
152 153 154 155 156 157 158 | [self release]; @throw e; } return self; } | | | | 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 | [self release]; @throw e; } return self; } - (instancetype)initWithItemsNoCopy: (void *)items count: (size_t)count freeWhenDone: (bool)freeWhenDone { return [self initWithItemsNoCopy: items itemSize: 1 count: count freeWhenDone: freeWhenDone]; } - (instancetype)initWithItemsNoCopy: (void *)items itemSize: (size_t)itemSize count: (size_t)count freeWhenDone: (bool)freeWhenDone { self = [super init]; @try { |
︙ | ︙ |