Overview
Context
Changes
Modified src/Makefile
from [904bd28ea3]
to [eb6b9dbb80].
︙ | | |
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
|
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
|
-
-
-
+
+
+
+
+
-
-
|
ObjFW.h \
macros.h \
objfw-defs.h \
platform.h \
${USE_INCLUDES_ATOMIC}
SRCS += OFASPrintF.m \
OFAdjacentArray.m \
OFAdjacentData.m \
OFAdjacentSubarray.m \
OFArchiveIRIHandler.m \
OFBase64.m \
OFBitSetCharacterSet.m \
OFBytesValue.m \
OFCRC16.m \
OFCRC32.m \
OFConcreteArray.m \
OFConcreteData.m \
OFConcreteMutableArray.m \
OFConcreteMutableData.m \
OFConcreteSubarray.m \
OFCountedMapTableSet.m \
OFEmbeddedIRIHandler.m \
OFHuffmanTree.m \
OFINIFileSettings.m \
OFInvertedCharacterSet.m \
OFLHADecompressingStream.m \
OFMapTableDictionary.m \
OFMapTableSet.m \
OFMutableAdjacentArray.m \
OFMutableAdjacentData.m \
OFMutableMapTableDictionary.m \
OFMutableMapTableSet.m \
OFMutableUTF8String.m \
OFNonretainedObjectValue.m \
OFPointValue.m \
OFPointerValue.m \
OFRangeCharacterSet.m \
|
︙ | | |
Modified src/OFArray.m
from [9b0a605b93]
to [2c1ad7f305].
︙ | | |
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
-
+
|
#include "config.h"
#include <stdarg.h>
#include <stdlib.h>
#import "OFArray.h"
#import "OFArray+Private.h"
#import "OFAdjacentArray.h"
#import "OFConcreteArray.h"
#import "OFData.h"
#import "OFNull.h"
#import "OFString.h"
#import "OFSubarray.h"
#import "OFEnumerationMutationException.h"
#import "OFInvalidArgumentException.h"
|
︙ | | |
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
|
-
+
-
+
-
+
-
+
-
+
-
+
|
@interface OFPlaceholderArray: OFArray
@end
@implementation OFPlaceholderArray
- (instancetype)init
{
return (id)[[OFAdjacentArray alloc] init];
return (id)[[OFConcreteArray alloc] init];
}
- (instancetype)initWithObject: (id)object
{
return (id)[[OFAdjacentArray alloc] initWithObject: object];
return (id)[[OFConcreteArray alloc] initWithObject: object];
}
- (instancetype)initWithObjects: (id)firstObject, ...
{
id ret;
va_list arguments;
va_start(arguments, firstObject);
ret = [[OFAdjacentArray alloc] initWithObject: firstObject
ret = [[OFConcreteArray alloc] initWithObject: firstObject
arguments: arguments];
va_end(arguments);
return ret;
}
- (instancetype)initWithObject: (id)firstObject
arguments: (va_list)arguments
{
return (id)[[OFAdjacentArray alloc] initWithObject: firstObject
return (id)[[OFConcreteArray alloc] initWithObject: firstObject
arguments: arguments];
}
- (instancetype)initWithArray: (OFArray *)array
{
return (id)[[OFAdjacentArray alloc] initWithArray: array];
return (id)[[OFConcreteArray alloc] initWithArray: array];
}
- (instancetype)initWithObjects: (id const *)objects
count: (size_t)count
{
return (id)[[OFAdjacentArray alloc] initWithObjects: objects
return (id)[[OFConcreteArray alloc] initWithObjects: objects
count: count];
}
- (instancetype)retain
{
return self;
}
|
︙ | | |
Renamed and modified
src/OFAdjacentArray.h
[e6ee87088b]
to src/OFConcreteArray.h
[dabce2fdfc].
︙ | | |
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
-
+
|
#import "OFArray.h"
OF_ASSUME_NONNULL_BEGIN
@class OFMutableData;
@interface OFAdjacentArray: OFArray
@interface OFConcreteArray: OFArray
{
OFMutableData *_array;
}
@end
OF_ASSUME_NONNULL_END
|
Renamed and modified
src/OFAdjacentArray.m
[9ab2d4adfc]
to src/OFConcreteArray.m
[5f63cf2e4a].
︙ | | |
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
-
-
-
-
+
+
+
+
-
+
|
* file.
*/
#include "config.h"
#include <stdarg.h>
#import "OFAdjacentArray.h"
#import "OFAdjacentSubarray.h"
#import "OFData.h"
#import "OFMutableAdjacentArray.h"
#import "OFConcreteArray.h"
#import "OFConcreteMutableArray.h"
#import "OFConcreteSubarray.h"
#import "OFData.h"
#import "OFString.h"
#import "OFEnumerationMutationException.h"
#import "OFInvalidArgumentException.h"
#import "OFOutOfRangeException.h"
@implementation OFAdjacentArray
@implementation OFConcreteArray
- (instancetype)init
{
self = [super init];
@try {
_array = [[OFMutableData alloc] initWithItemSize: sizeof(id)];
} @catch (id e) {
|
︙ | | |
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
|
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
|
-
+
-
-
+
+
|
@throw [OFOutOfRangeException exception];
if ([self isKindOfClass: [OFMutableArray class]])
return [OFArray
arrayWithObjects: (id *)_array.items + range.location
count: range.length];
return [[[OFAdjacentSubarray alloc] initWithArray: self
return [[[OFConcreteSubarray alloc] initWithArray: self
range: range] autorelease];
}
- (bool)isEqual: (id)object
{
OFArray *otherArray;
id const *objects, *otherObjects;
size_t count;
if (object == self)
return true;
if (![object isKindOfClass: [OFAdjacentArray class]] &&
![object isKindOfClass: [OFMutableAdjacentArray class]])
if (![object isKindOfClass: [OFConcreteArray class]] &&
![object isKindOfClass: [OFConcreteMutableArray class]])
return [super isEqual: object];
otherArray = object;
count = _array.count;
if (count != otherArray.count)
|
︙ | | |
Renamed and modified
src/OFAdjacentData.h
[73a50c8d27]
to src/OFConcreteData.h
[fc283ba5a6].
︙ | | |
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
-
+
|
* file.
*/
#import "OFData.h"
OF_ASSUME_NONNULL_BEGIN
@interface OFAdjacentData: OFData
@interface OFConcreteData: OFData
{
unsigned char *_Nullable _items;
size_t _capacity, _count, _itemSize;
bool _freeWhenDone;
}
@end
|
︙ | | |
Renamed and modified
src/OFAdjacentData.m
[bdc7c51f78]
to src/OFConcreteData.m
[2174d3a707].
︙ | | |
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
-
+
-
+
|
*/
#include "config.h"
#include <limits.h>
#include <string.h>
#import "OFAdjacentData.h"
#import "OFConcreteData.h"
#import "OFInvalidArgumentException.h"
#import "OFOutOfRangeException.h"
@implementation OFAdjacentData
@implementation OFConcreteData
- (instancetype)init
{
return [self initWithItemSize: 1];
}
- (instancetype)initWithItemSize: (size_t)itemSize
{
|
︙ | | |
Renamed and modified
src/OFMutableAdjacentArray.h
[bd2f97a834]
to src/OFConcreteMutableArray.h
[46129739e1].
︙ | | |
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
-
+
|
#import "OFArray.h"
OF_ASSUME_NONNULL_BEGIN
@class OFMutableData;
@interface OFMutableAdjacentArray: OFMutableArray
@interface OFConcreteMutableArray: OFMutableArray
{
OFMutableData *_array;
unsigned long _mutations;
}
@end
OF_ASSUME_NONNULL_END
|
Renamed and modified
src/OFMutableAdjacentArray.m
[da5d41d53e]
to src/OFConcreteMutableArray.m
[3bbe83e7a7].
︙ | | |
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
-
-
+
+
-
+
-
-
+
+
|
* file.
*/
#include "config.h"
#include <string.h>
#import "OFMutableAdjacentArray.h"
#import "OFAdjacentArray.h"
#import "OFConcreteMutableArray.h"
#import "OFConcreteArray.h"
#import "OFArray+Private.h"
#import "OFData.h"
#import "OFEnumerationMutationException.h"
#import "OFInvalidArgumentException.h"
#import "OFOutOfRangeException.h"
@implementation OFMutableAdjacentArray
@implementation OFConcreteMutableArray
+ (void)initialize
{
if (self == [OFMutableAdjacentArray class])
[self inheritMethodsFromClass: [OFAdjacentArray class]];
if (self == [OFConcreteMutableArray class])
[self inheritMethodsFromClass: [OFConcreteArray class]];
}
- (instancetype)initWithCapacity: (size_t)capacity
{
self = [super init];
@try {
|
︙ | | |
374
375
376
377
378
379
380
381
382
383
|
374
375
376
377
378
379
380
381
382
383
|
-
+
|
}
}
}
#endif
- (void)makeImmutable
{
object_setClass(self, [OFAdjacentArray class]);
object_setClass(self, [OFConcreteArray class]);
}
@end
|
Renamed and modified
src/OFMutableAdjacentData.h
[0582bcc9e5]
to src/OFConcreteMutableData.h
[e000b4c25d].
︙ | | |
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
-
+
|
* file.
*/
#import "OFMutableData.h"
OF_ASSUME_NONNULL_BEGIN
@interface OFMutableAdjacentData: OFMutableData
@interface OFConcreteMutableData: OFMutableData
{
unsigned char *_Nullable _items;
size_t _capacity, _count, _itemSize;
bool _freeWhenDone;
}
@end
|
︙ | | |
Renamed and modified
src/OFMutableAdjacentData.m
[dbdac00eff]
to src/OFConcreteMutableData.m
[bfb6cd5ccd].
︙ | | |
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
-
-
+
+
-
+
-
-
+
+
|
*/
#include "config.h"
#include <limits.h>
#include <string.h>
#import "OFMutableAdjacentData.h"
#import "OFAdjacentData.h"
#import "OFConcreteMutableData.h"
#import "OFConcreteData.h"
#import "OFInvalidArgumentException.h"
#import "OFOutOfMemoryException.h"
#import "OFOutOfRangeException.h"
@implementation OFMutableAdjacentData
@implementation OFConcreteMutableData
+ (void)initialize
{
if (self == [OFMutableAdjacentData class])
[self inheritMethodsFromClass: [OFAdjacentData class]];
if (self == [OFConcreteMutableData class])
[self inheritMethodsFromClass: [OFConcreteData class]];
}
- (instancetype)initWithItemSize: (size_t)itemSize capacity: (size_t)capacity
{
self = [super init];
@try {
|
︙ | | |
180
181
182
183
184
185
186
187
188
189
|
180
181
182
183
184
185
186
187
188
189
|
-
+
|
_items = OFResizeMemory(_items, _count, _itemSize);
_capacity = _count;
} @catch (OFOutOfMemoryException *e) {
/* We don't care, as we only made it smaller */
}
}
object_setClass(self, [OFAdjacentData class]);
object_setClass(self, [OFConcreteData class]);
}
@end
|
Renamed and modified
src/OFAdjacentSubarray.h
[abbd5bb00b]
to src/OFConcreteSubarray.h
[a7f31fb972].
︙ | | |
13
14
15
16
17
18
19
20
21
22
23
|
13
14
15
16
17
18
19
20
21
22
23
|
-
+
|
* file.
*/
#import "OFSubarray.h"
OF_ASSUME_NONNULL_BEGIN
@interface OFAdjacentSubarray: OFSubarray
@interface OFConcreteSubarray: OFSubarray
@end
OF_ASSUME_NONNULL_END
|
Renamed and modified
src/OFAdjacentSubarray.m
[c5bbd0c071]
to src/OFConcreteSubarray.m
[bef23c745d].
︙ | | |
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
-
-
-
+
+
+
-
+
-
-
+
+
|
* Public License, either version 2 or 3, which can be found in the file
* LICENSE.GPLv2 or LICENSE.GPLv3 respectively included in the packaging of this
* file.
*/
#include "config.h"
#import "OFAdjacentSubarray.h"
#import "OFAdjacentArray.h"
#import "OFMutableAdjacentArray.h"
#import "OFConcreteSubarray.h"
#import "OFConcreteArray.h"
#import "OFConcreteMutableArray.h"
@implementation OFAdjacentSubarray
@implementation OFConcreteSubarray
- (const id *)objects
{
return _array.objects + _range.location;
}
- (bool)isEqual: (id)object
{
OFArray *otherArray;
id const *objects, *otherObjects;
if (object == self)
return true;
if (![object isKindOfClass: [OFAdjacentArray class]] &&
![object isKindOfClass: [OFMutableAdjacentArray class]])
if (![object isKindOfClass: [OFConcreteArray class]] &&
![object isKindOfClass: [OFConcreteMutableArray class]])
return [super isEqual: object];
otherArray = object;
if (_range.length != otherArray.count)
return false;
|
︙ | | |
Modified src/OFData.m
from [c534072540]
to [caad88cdae].
︙ | | |
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
-
-
+
+
|
#include "config.h"
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#import "OFData.h"
#import "OFAdjacentData.h"
#import "OFBase64.h"
#import "OFBase64.h"
#import "OFConcreteData.h"
#import "OFDictionary.h"
#ifdef OF_HAVE_FILES
# import "OFFile.h"
# import "OFFileManager.h"
#endif
#import "OFIRI.h"
#import "OFIRIHandler.h"
|
︙ | | |
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
|
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
|
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
|
_OFData_CryptographicHashing_reference = 1;
_OFData_MessagePackParsing_reference = 1;
}
@implementation OFDataPlaceholder
- (instancetype)init
{
return (id)[[OFAdjacentData alloc] init];
return (id)[[OFConcreteData alloc] init];
}
- (instancetype)initWithItemSize: (size_t)itemSize
{
return (id)[[OFAdjacentData alloc] initWithItemSize: itemSize];
return (id)[[OFConcreteData alloc] initWithItemSize: itemSize];
}
- (instancetype)initWithItems: (const void *)items count: (size_t)count
{
return (id)[[OFAdjacentData alloc] initWithItems: items count: count];
return (id)[[OFConcreteData alloc] initWithItems: items count: count];
}
- (instancetype)initWithItems: (const void *)items
count: (size_t)count
itemSize: (size_t)itemSize
{
return (id)[[OFAdjacentData alloc] initWithItems: items
return (id)[[OFConcreteData alloc] initWithItems: items
count: count
itemSize: itemSize];
}
- (instancetype)initWithItemsNoCopy: (void *)items
count: (size_t)count
freeWhenDone: (bool)freeWhenDone
{
return (id)[[OFAdjacentData alloc] initWithItemsNoCopy: items
return (id)[[OFConcreteData alloc] initWithItemsNoCopy: items
count: count
freeWhenDone: freeWhenDone];
}
- (instancetype)initWithItemsNoCopy: (void *)items
count: (size_t)count
itemSize: (size_t)itemSize
freeWhenDone: (bool)freeWhenDone
{
return (id)[[OFAdjacentData alloc] initWithItemsNoCopy: items
return (id)[[OFConcreteData alloc] initWithItemsNoCopy: items
count: count
itemSize: itemSize
freeWhenDone: freeWhenDone];
}
#ifdef OF_HAVE_FILES
- (instancetype)initWithContentsOfFile: (OFString *)path
{
return (id)[[OFAdjacentData alloc] initWithContentsOfFile: path];
return (id)[[OFConcreteData alloc] initWithContentsOfFile: path];
}
#endif
- (instancetype)initWithContentsOfIRI: (OFIRI *)IRI
{
return (id)[[OFAdjacentData alloc] initWithContentsOfIRI: IRI];
return (id)[[OFConcreteData alloc] initWithContentsOfIRI: IRI];
}
- (instancetype)initWithStringRepresentation: (OFString *)string
{
return (id)[[OFAdjacentData alloc]
return (id)[[OFConcreteData alloc]
initWithStringRepresentation: string];
}
- (instancetype)initWithBase64EncodedString: (OFString *)string
{
return (id)[[OFAdjacentData alloc] initWithBase64EncodedString: string];
return (id)[[OFConcreteData alloc] initWithBase64EncodedString: string];
}
@end
@implementation OFData
+ (void)initialize
{
if (self == [OFData class])
|
︙ | | |
Modified src/OFMutableArray.m
from [84ae5a66bf]
to [18c863621c].
︙ | | |
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
-
+
|
#include "config.h"
#include <stdlib.h>
#include <string.h>
#import "OFMutableArray.h"
#import "OFMutableAdjacentArray.h"
#import "OFConcreteMutableArray.h"
#import "OFEnumerationMutationException.h"
#import "OFInvalidArgumentException.h"
#import "OFOutOfRangeException.h"
static struct {
Class isa;
|
︙ | | |
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
|
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
|
-
+
-
+
-
+
-
+
-
+
-
+
-
+
|
left = i + 1;
}
}
@implementation OFMutableArrayPlaceholder
- (instancetype)init
{
return (id)[[OFMutableAdjacentArray alloc] init];
return (id)[[OFConcreteMutableArray alloc] init];
}
- (instancetype)initWithCapacity: (size_t)capacity
{
return (id)[[OFMutableAdjacentArray alloc] initWithCapacity: capacity];
return (id)[[OFConcreteMutableArray alloc] initWithCapacity: capacity];
}
- (instancetype)initWithObject: (id)object
{
return (id)[[OFMutableAdjacentArray alloc] initWithObject: object];
return (id)[[OFConcreteMutableArray alloc] initWithObject: object];
}
- (instancetype)initWithObjects: (id)firstObject, ...
{
id ret;
va_list arguments;
va_start(arguments, firstObject);
ret = [[OFMutableAdjacentArray alloc] initWithObject: firstObject
ret = [[OFConcreteMutableArray alloc] initWithObject: firstObject
arguments: arguments];
va_end(arguments);
return ret;
}
- (instancetype)initWithObject: (id)firstObject arguments: (va_list)arguments
{
return (id)[[OFMutableAdjacentArray alloc] initWithObject: firstObject
return (id)[[OFConcreteMutableArray alloc] initWithObject: firstObject
arguments: arguments];
}
- (instancetype)initWithArray: (OFArray *)array
{
return (id)[[OFMutableAdjacentArray alloc] initWithArray: array];
return (id)[[OFConcreteMutableArray alloc] initWithArray: array];
}
- (instancetype)initWithObjects: (id const *)objects count: (size_t)count
{
return (id)[[OFMutableAdjacentArray alloc] initWithObjects: objects
return (id)[[OFConcreteMutableArray alloc] initWithObjects: objects
count: count];
}
- (instancetype)retain
{
return self;
}
|
︙ | | |
Modified src/OFMutableData.m
from [88129bd097]
to [a323ede2b7].
︙ | | |
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
|
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
|
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
|
#include "config.h"
#include <stdlib.h>
#include <string.h>
#include <limits.h>
#import "OFMutableData.h"
#import "OFMutableAdjacentData.h"
#import "OFConcreteMutableData.h"
#import "OFOutOfRangeException.h"
static struct {
Class isa;
} placeholder;
@interface OFMutableDataPlaceholder: OFMutableData
@end
@implementation OFMutableDataPlaceholder
- (instancetype)init
{
return (id)[[OFMutableAdjacentData alloc] init];
return (id)[[OFConcreteMutableData alloc] init];
}
- (instancetype)initWithItemSize: (size_t)itemSize
{
return (id)[[OFMutableAdjacentData alloc] initWithItemSize: itemSize];
return (id)[[OFConcreteMutableData alloc] initWithItemSize: itemSize];
}
- (instancetype)initWithItems: (const void *)items count: (size_t)count
{
return (id)[[OFMutableAdjacentData alloc] initWithItems: items
return (id)[[OFConcreteMutableData alloc] initWithItems: items
count: count];
}
- (instancetype)initWithItems: (const void *)items
count: (size_t)count
itemSize: (size_t)itemSize
{
return (id)[[OFMutableAdjacentData alloc] initWithItems: items
return (id)[[OFConcreteMutableData alloc] initWithItems: items
count: count
itemSize: itemSize];
}
- (instancetype)initWithItemsNoCopy: (void *)items
count: (size_t)count
freeWhenDone: (bool)freeWhenDone
{
return (id)[[OFMutableAdjacentData alloc]
return (id)[[OFConcreteMutableData alloc]
initWithItemsNoCopy: items
count: count
freeWhenDone: freeWhenDone];
}
- (instancetype)initWithItemsNoCopy: (void *)items
count: (size_t)count
itemSize: (size_t)itemSize
freeWhenDone: (bool)freeWhenDone
{
return (id)[[OFMutableAdjacentData alloc]
return (id)[[OFConcreteMutableData alloc]
initWithItemsNoCopy: items
count: count
itemSize: itemSize
freeWhenDone: freeWhenDone];
}
#ifdef OF_HAVE_FILES
- (instancetype)initWithContentsOfFile: (OFString *)path
{
return (id)[[OFMutableAdjacentData alloc] initWithContentsOfFile: path];
return (id)[[OFConcreteMutableData alloc] initWithContentsOfFile: path];
}
#endif
- (instancetype)initWithContentsOfIRI: (OFIRI *)IRI
{
return (id)[[OFMutableAdjacentData alloc] initWithContentsOfIRI: IRI];
return (id)[[OFConcreteMutableData alloc] initWithContentsOfIRI: IRI];
}
- (instancetype)initWithStringRepresentation: (OFString *)string
{
return (id)[[OFMutableAdjacentData alloc]
return (id)[[OFConcreteMutableData alloc]
initWithStringRepresentation: string];
}
- (instancetype)initWithBase64EncodedString: (OFString *)string
{
return (id)[[OFMutableAdjacentData alloc]
return (id)[[OFConcreteMutableData alloc]
initWithBase64EncodedString: string];
}
- (instancetype)initWithCapacity: (size_t)capacity
{
return (id)[[OFMutableAdjacentData alloc] initWithCapacity: capacity];
return (id)[[OFConcreteMutableData alloc] initWithCapacity: capacity];
}
- (instancetype)initWithItemSize: (size_t)itemSize capacity: (size_t)capacity
{
return (id)[[OFMutableAdjacentData alloc] initWithItemSize: itemSize
return (id)[[OFConcreteMutableData alloc] initWithItemSize: itemSize
capacity: capacity];
}
@end
@implementation OFMutableData
+ (void)initialize
{
|
︙ | | |