Differences From Artifact [c971350bab]:
- File src/OFMutableData.m — part of check-in [a06354b42a] at 2017-10-22 15:05:39 on branch trunk — Make Apple GCC with -Wshadow happy (user: js, size: 6345) [annotate] [blame] [check-ins using]
To Artifact [d12ca7c473]:
- File
src/OFMutableData.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: 6172) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
47 48 49 50 51 52 53 | + (instancetype)dataWithItemSize: (size_t)itemSize capacity: (size_t)capacity { return [[[self alloc] initWithItemSize: itemSize capacity: capacity] autorelease]; } | < < < < < < < < < < < < < < < | 47 48 49 50 51 52 53 54 55 56 57 58 59 60 | + (instancetype)dataWithItemSize: (size_t)itemSize capacity: (size_t)capacity { return [[[self alloc] initWithItemSize: itemSize capacity: capacity] autorelease]; } - (instancetype)init { self = [super of_init]; _itemSize = 1; return self; |
︙ | ︙ | |||
129 130 131 132 133 134 135 | count: count]; _capacity = _count; return self; } | | > > | > > | > | > | > > > | > > > > | 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 | count: count]; _capacity = _count; return self; } - (instancetype)initWithItemsNoCopy: (void *)items count: (size_t)count freeWhenDone: (bool)freeWhenDone { self = [self initWithItems: items count: count]; if (freeWhenDone) free(items); return self; } - (instancetype)initWithItemsNoCopy: (void *)items itemSize: (size_t)itemSize count: (size_t)count freeWhenDone: (bool)freeWhenDone { self = [self initWithItems: items itemSize: itemSize count: count]; if (freeWhenDone) free(items); return self; } - (instancetype)initWithStringRepresentation: (OFString *)string { self = [super initWithStringRepresentation: string]; _capacity = _count; |
︙ | ︙ |