Modified configure.ac
from [15204dd6eb]
to [64f9cbaf6c].
︙ | | |
183
184
185
186
187
188
189
190
191
192
193
194
195
196
|
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
|
+
+
|
[OBJCFLAGS="$OBJCFLAGS -Wshorten-64-to-32"])
AX_CHECK_COMPILER_FLAGS([-Wundeclared-selector -Werror],
[OBJCFLAGS="$OBJCFLAGS -Wundeclared-selector"])
AX_CHECK_COMPILER_FLAGS([-Wsemicolon-before-method-body -Werror],
[OBJCFLAGS="$OBJCFLAGS -Wsemicolon-before-method-body"])
AX_CHECK_COMPILER_FLAGS([-Wobjc-missing-property-synthesis -Werror],
[OBJCFLAGS="$OBJCFLAGS -Wobjc-missing-property-synthesis"])
AX_CHECK_COMPILER_FLAGS([-Wmissing-method-return-type -Werror],
[OBJCFLAGS="$OBJCFLAGS -Wmissing-method-return-type"])
AC_MSG_CHECKING(whether Objective C compiler supports properties)
AC_TRY_COMPILE([
#ifdef __has_attribute
# if __has_attribute(objc_root_class)
__attribute__((__objc_root_class__))
# endif
|
︙ | | |
Modified src/OFApplication.h
from [e7e5df2d5d]
to [45023093c6].
︙ | | |
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
|
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
|
-
+
|
* This is only available if `OF_HAVE_SANDBOX` is defined.
*
* @param sandbox The sandbox to activate
*/
+ (void)activateSandbox: (OFSandbox *)sandbox;
#endif
- init OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
/*!
* @brief Gets argc and argv.
*
* @param argc A pointer where a pointer to argc should be stored
* @param argv A pointer where a pointer to argv should be stored
*/
|
︙ | | |
Modified src/OFApplication.m
from [f12746971d]
to [c080ac0fe6].
︙ | | |
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
|
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
|
-
+
-
+
|
#ifdef OF_HAVE_SANDBOX
+ (void)activateSandbox: (OFSandbox *)sandbox
{
[app activateSandbox: sandbox];
}
#endif
- init
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
- of_init
- (instancetype)of_init
{
self = [super init];
@try {
_environment = [[OFMutableDictionary alloc] init];
atexit(atexitHandler);
|
︙ | | |
Modified src/OFArray.h
from [ef2bf9920b]
to [0a6a732f59].
︙ | | |
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
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
177
178
179
180
181
182
183
184
185
186
187
188
|
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
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
177
178
179
180
181
182
183
184
185
186
187
188
|
-
+
-
+
-
-
+
+
-
+
-
-
+
+
|
/*!
* @brief Initializes an OFArray with the specified object.
*
* @param object An object
* @return An initialized OFArray
*/
- initWithObject: (ObjectType)object;
- (instancetype)initWithObject: (ObjectType)object;
/*!
* @brief Initializes an OFArray with the specified objects.
*
* @param firstObject The first object
* @return An initialized OFArray
*/
- initWithObjects: (ObjectType)firstObject, ... OF_SENTINEL;
- (instancetype)initWithObjects: (ObjectType)firstObject, ... OF_SENTINEL;
/*!
* @brief Initializes an OFArray with the specified object and a va_list.
*
* @param firstObject The first object
* @param arguments A va_list
* @return An initialized OFArray
*/
- initWithObject: (ObjectType)firstObject
arguments: (va_list)arguments;
- (instancetype)initWithObject: (ObjectType)firstObject
arguments: (va_list)arguments;
/*!
* @brief Initializes an OFArray with the objects from the specified array.
*
* @param array An array
* @return An initialized OFArray
*/
- initWithArray: (OFArray OF_GENERIC(ObjectType) *)array;
- (instancetype)initWithArray: (OFArray OF_GENERIC(ObjectType) *)array;
/*!
* @brief Initializes an OFArray with the objects from the specified C array of
* the specified length.
*
* @param objects A C array of objects
* @param count The length of the C array
* @return An initialized OFArray
*/
- initWithObjects: (ObjectType const _Nonnull *_Nonnull)objects
count: (size_t)count;
- (instancetype)initWithObjects: (ObjectType const _Nonnull *_Nonnull)objects
count: (size_t)count;
/*!
* @brief Returns the object at the specified index in the array.
*
* @warning The returned object is *not* retained and autoreleased for
* performance reasons!
*
|
︙ | | |
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
|
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
|
-
-
+
+
|
OFArray *_array;
size_t _count;
unsigned long _mutations;
unsigned long *_Nullable _mutationsPtr;
size_t _position;
}
- initWithArray: (OFArray *)data
mutationsPtr: (nullable unsigned long *)mutationsPtr;
- (instancetype)initWithArray: (OFArray *)data
mutationsPtr: (nullable unsigned long *)mutationsPtr;
@end
OF_ASSUME_NONNULL_END
#import "OFMutableArray.h"
#if !defined(NSINTEGER_DEFINED) && !__has_feature(modules)
/* Required for array literals to work */
@compatibility_alias NSArray OFArray;
#endif
|
Modified src/OFArray.m
from [1c7667e82c]
to [5414c26349].
︙ | | |
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
|
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
|
-
+
-
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
+
-
+
|
depth: (size_t)depth;
@end
@interface OFArray_placeholder: OFArray
@end
@implementation OFArray_placeholder
- init
- (instancetype)init
{
return (id)[[OFArray_adjacent alloc] init];
}
- initWithObject: (id)object
- (instancetype)initWithObject: (id)object
{
return (id)[[OFArray_adjacent alloc] initWithObject: object];
}
- initWithObjects: (id)firstObject, ...
- (instancetype)initWithObjects: (id)firstObject, ...
{
id ret;
va_list arguments;
va_start(arguments, firstObject);
ret = [[OFArray_adjacent alloc] initWithObject: firstObject
arguments: arguments];
va_end(arguments);
return ret;
}
- initWithObject: (id)firstObject
arguments: (va_list)arguments
- (instancetype)initWithObject: (id)firstObject
arguments: (va_list)arguments
{
return (id)[[OFArray_adjacent alloc] initWithObject: firstObject
arguments: arguments];
}
- initWithArray: (OFArray *)array
- (instancetype)initWithArray: (OFArray *)array
{
return (id)[[OFArray_adjacent alloc] initWithArray: array];
}
- initWithObjects: (id const *)objects
count: (size_t)count
- (instancetype)initWithObjects: (id const *)objects
count: (size_t)count
{
return (id)[[OFArray_adjacent alloc] initWithObjects: objects
count: count];
}
- initWithSerialization: (OFXMLElement *)element
- (instancetype)initWithSerialization: (OFXMLElement *)element
{
return (id)[[OFArray_adjacent alloc] initWithSerialization: element];
}
- retain
- (instancetype)retain
{
return self;
}
- autorelease
- (instancetype)autorelease
{
return self;
}
- (void)release
{
}
|
︙ | | |
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
|
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
|
-
+
|
@implementation OFArray
+ (void)initialize
{
if (self == [OFArray class])
placeholder.isa = [OFArray_placeholder class];
}
+ alloc
+ (instancetype)alloc
{
if (self == [OFArray class])
return (id)&placeholder;
return [super alloc];
}
|
︙ | | |
159
160
161
162
163
164
165
166
167
168
169
170
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
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
229
|
159
160
161
162
163
164
165
166
167
168
169
170
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
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
229
|
-
+
-
+
-
+
-
-
+
+
+
+
+
+
+
-
+
+
-
-
-
-
-
-
-
+
|
+ (instancetype)arrayWithObjects: (id const *)objects
count: (size_t)count
{
return [[[self alloc] initWithObjects: objects
count: count] autorelease];
}
- init
- (instancetype)init
{
if (object_getClass(self) == [OFArray class]) {
@try {
[self doesNotRecognizeSelector: _cmd];
} @catch (id e) {
[self release];
@throw e;
}
abort();
}
return [super init];
}
- initWithObject: (id)object
- (instancetype)initWithObject: (id)object
{
if (object == nil) {
[self release];
@throw [OFInvalidArgumentException exception];
}
return [self initWithObjects: object, nil];
}
- initWithObjects: (id)firstObject, ...
- (instancetype)initWithObjects: (id)firstObject, ...
{
id ret;
va_list arguments;
va_start(arguments, firstObject);
ret = [self initWithObject: firstObject
arguments: arguments];
va_end(arguments);
return ret;
}
- initWithObject: (id)firstObject
arguments: (va_list)arguments
- (instancetype)initWithObject: (id)firstObject
arguments: (va_list)arguments
{
OF_INVALID_INIT_METHOD
}
- (instancetype)initWithArray: (OFArray *)array
{
OF_INVALID_INIT_METHOD
}
- initWithArray: (OFArray *)array
- (instancetype)initWithObjects: (id const *)objects
count: (size_t)count
{
OF_INVALID_INIT_METHOD
}
- initWithObjects: (id const *)objects
count: (size_t)count
{
OF_INVALID_INIT_METHOD
}
- initWithSerialization: (OFXMLElement *)element
- (instancetype)initWithSerialization: (OFXMLElement *)element
{
OF_INVALID_INIT_METHOD
}
- (size_t)count
{
OF_UNRECOGNIZED_SELECTOR
|
︙ | | |
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
|
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
|
-
+
-
+
|
[self getObjects: buffer
inRange: of_range(0, count)];
return buffer;
}
- copy
- (id)copy
{
return [self retain];
}
- mutableCopy
- (id)mutableCopy
{
return [[OFMutableArray alloc] initWithArray: self];
}
- (id)objectAtIndex: (size_t)index
{
OF_UNRECOGNIZED_SELECTOR
|
︙ | | |
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
|
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
|
-
-
+
+
|
return [current autorelease];
}
#endif
@end
@implementation OFArrayEnumerator
- initWithArray: (OFArray *)array
mutationsPtr: (unsigned long *)mutationsPtr
- (instancetype)initWithArray: (OFArray *)array
mutationsPtr: (unsigned long *)mutationsPtr
{
self = [super init];
_array = [array retain];
_count = [array count];
_mutations = (mutationsPtr != NULL ? *mutationsPtr : 0);
_mutationsPtr = mutationsPtr;
|
︙ | | |
Modified src/OFArray_adjacent.m
from [45617fcf1b]
to [c6a82f0db4].
︙ | | |
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
|
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
|
-
+
-
+
-
-
+
+
|
#import "OFXMLElement.h"
#import "OFEnumerationMutationException.h"
#import "OFInvalidArgumentException.h"
#import "OFOutOfRangeException.h"
@implementation OFArray_adjacent
- init
- (instancetype)init
{
self = [super init];
@try {
_array = [[OFMutableData alloc] initWithItemSize: sizeof(id)];
} @catch (id e) {
[self release];
@throw e;
}
return self;
}
- initWithObject: (id)object
- (instancetype)initWithObject: (id)object
{
self = [self init];
@try {
if (object == nil)
@throw [OFInvalidArgumentException exception];
[_array addItem: &object];
[object retain];
} @catch (id e) {
[self release];
@throw e;
}
return self;
}
- initWithObject: (id)firstObject
arguments: (va_list)arguments
- (instancetype)initWithObject: (id)firstObject
arguments: (va_list)arguments
{
self = [self init];
@try {
id object;
[_array addItem: &firstObject];
|
︙ | | |
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
-
+
|
[self release];
@throw e;
}
return self;
}
- initWithArray: (OFArray *)array
- (instancetype)initWithArray: (OFArray *)array
{
id const *objects;
size_t count;
self = [super init];
if (array == nil)
|
︙ | | |
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
|
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
|
-
-
+
+
|
[self release];
@throw e;
}
return self;
}
- initWithObjects: (id const *)objects
count: (size_t)count
- (instancetype)initWithObjects: (id const *)objects
count: (size_t)count
{
self = [self init];
@try {
bool ok = true;
for (size_t i = 0; i < count; i++) {
|
︙ | | |
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
|
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
|
-
+
|
[self release];
@throw e;
}
return self;
}
- initWithSerialization: (OFXMLElement *)element
- (instancetype)initWithSerialization: (OFXMLElement *)element
{
self = [self init];
@try {
void *pool = objc_autoreleasePoolPush();
if ((![[element name] isEqual: @"OFArray"] &&
|
︙ | | |
Modified src/OFArray_subarray.h
from [716934f439]
to [17169ca2bb].
︙ | | |
22
23
24
25
26
27
28
29
30
31
32
33
|
22
23
24
25
26
27
28
29
30
31
32
33
|
-
-
+
+
|
{
OFArray *_array;
of_range_t _range;
}
+ (instancetype)arrayWithArray: (OFArray *)array
range: (of_range_t)range;
- initWithArray: (OFArray *)array
range: (of_range_t)range;
- (instancetype)initWithArray: (OFArray *)array
range: (of_range_t)range;
@end
OF_ASSUME_NONNULL_END
|
Modified src/OFArray_subarray.m
from [b087bc3ca0]
to [25410c7619].
︙ | | |
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
-
-
+
+
|
+ (instancetype)arrayWithArray: (OFArray *)array
range: (of_range_t)range
{
return [[[self alloc] initWithArray: array
range: range] autorelease];
}
- initWithArray: (OFArray *)array
range: (of_range_t)range
- (instancetype)initWithArray: (OFArray *)array
range: (of_range_t)range
{
self = [super init];
@try {
/* Should usually be retain, as it's useless with a copy */
_array = [array copy];
_range = range;
|
︙ | | |
Modified src/OFAutoreleasePool.m
from [e9bf9ceb4f]
to [ae2a82f384].
︙ | | |
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
-
+
|
if (!of_tlskey_new(&cacheKey))
@throw [OFInitializationFailedException
exceptionWithClass: self];
}
#endif
+ alloc
+ (instancetype)alloc
{
#if !defined(OF_HAVE_COMPILER_TLS) && defined(OF_HAVE_THREADS)
OFAutoreleasePool **cache = of_tlskey_get(cacheKey);
#endif
if (cache != NULL) {
for (size_t i = 0; i < MAX_CACHE_SIZE; i++) {
|
︙ | | |
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
|
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
|
-
+
|
[cache[i] of_super_dealloc];
free(cache);
cache = NULL;
}
}
- init
- (instancetype)init
{
self = [super init];
@try {
_pool = objc_autoreleasePoolPush();
_objc_rootAutorelease(self);
|
︙ | | |
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
|
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
|
-
+
-
+
|
}
}
}
[super dealloc];
}
- retain
- (instancetype)retain
{
OF_UNRECOGNIZED_SELECTOR
}
- autorelease
- (instancetype)autorelease
{
OF_UNRECOGNIZED_SELECTOR
}
@end
|
Modified src/OFBlock.h
from [6289b76304]
to [b550d02e6f].
︙ | | |
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
-
-
+
+
|
/*!
* @class OFBlock OFBlock.h ObjFW/OFBlock.h
*
* @brief The class for all blocks, since all blocks are also objects.
*/
@interface OFBlock: OFObject
+ alloc OF_UNAVAILABLE;
- init OF_UNAVAILABLE;
+ (instancetype)alloc OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
@end
@interface OFStackBlock: OFBlock
@end
@interface OFGlobalBlock: OFBlock
@end
@interface OFMallocBlock: OFBlock
@end
OF_ASSUME_NONNULL_END
|
Modified src/OFBlock.m
from [bc6ad5b4e9]
to [a2a5089265].
︙ | | |
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
-
+
|
OF_BLOCK_FIELD_IS_BLOCK = 7,
OF_BLOCK_FIELD_IS_BYREF = 8,
OF_BLOCK_FIELD_IS_WEAK = 16,
OF_BLOCK_BYREF_CALLER = 128
};
@protocol RetainRelease
- retain;
- (instancetype)retain;
- (void)release;
@end
#ifdef OF_OBJFW_RUNTIME
/* Begin of ObjC module */
static struct objc_abi_class _NSConcreteStackBlock_metaclass = {
(struct objc_abi_class *)(void *)"OFBlock", "OFBlock", "OFStackBlock",
|
︙ | | |
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
|
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
|
-
+
-
+
|
memcpy(&_NSConcreteMallocBlock, tmp, sizeof(_NSConcreteMallocBlock));
free(tmp);
objc_registerClassPair((Class)&_NSConcreteMallocBlock);
# endif
#endif
}
+ alloc
+ (instancetype)alloc
{
OF_UNRECOGNIZED_SELECTOR
}
- init
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
- (void *)allocMemoryWithSize: (size_t)size
{
OF_UNRECOGNIZED_SELECTOR
|
︙ | | |
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
|
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
|
-
+
-
+
-
+
|
}
- (void)freeMemory: (void *)ptr
{
OF_UNRECOGNIZED_SELECTOR
}
- retain
- (instancetype)retain
{
if (object_getClass(self) == (Class)&_NSConcreteMallocBlock)
return Block_copy(self);
return self;
}
- copy
- (id)copy
{
return Block_copy(self);
}
- autorelease
- (instancetype)autorelease
{
if (object_getClass(self) == (Class)&_NSConcreteMallocBlock)
return [super autorelease];
return self;
}
|
︙ | | |
Modified src/OFCondition.m
from [c3c05a120f]
to [c139f6bdf6].
︙ | | |
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
-
+
|
@implementation OFCondition
+ (instancetype)condition
{
return [[[self alloc] init] autorelease];
}
- init
- (instancetype)init
{
self = [super init];
if (!of_condition_new(&_condition)) {
Class c = [self class];
[self release];
@throw [OFInitializationFailedException exceptionWithClass: c];
|
︙ | | |
Modified src/OFConstantString.m
from [58b7594810]
to [aaf59fe08c].
︙ | | |
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
-
+
-
|
} _OFConstantStringClassReference;
#endif
@interface OFString_const: OFString_UTF8
@end
@implementation OFString_const
+ alloc
+ (instancetype)alloc
{
OF_UNRECOGNIZED_SELECTOR
}
- (void *)allocMemoryWithSize: (size_t)size
{
OF_UNRECOGNIZED_SELECTOR
}
- (void *)allocMemoryWithSize: (size_t)size
|
︙ | | |
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
|
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
|
-
+
-
+
|
}
- (void)freeMemory: (void *)pointer
{
OF_UNRECOGNIZED_SELECTOR
}
- retain
- (instancetype)retain
{
return self;
}
- autorelease
- (instancetype)autorelease
{
return self;
}
- (unsigned int)retainCount
{
return OF_RETAIN_COUNT_MAX;
|
︙ | | |
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
|
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
|
-
+
|
}
_cString = (char *)ivars;
object_setClass(self, [OFString_const class]);
}
}
+ alloc
+ (instancetype)alloc
{
OF_UNRECOGNIZED_SELECTOR
}
- (void *)allocMemoryWithSize: (size_t)size
{
OF_UNRECOGNIZED_SELECTOR
|
︙ | | |
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
|
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
|
-
+
-
+
|
}
- (void)freeMemory: (void *)pointer
{
OF_UNRECOGNIZED_SELECTOR
}
- retain
- (instancetype)retain
{
return self;
}
- autorelease
- (instancetype)autorelease
{
return self;
}
- (unsigned int)retainCount
{
return OF_RETAIN_COUNT_MAX;
|
︙ | | |
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
|
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
|
-
+
-
+
|
/*
* In all following methods, the constant string is converted to an
* OFString_UTF8 and the message sent again.
*/
/* From protocol OFCopying */
- copy
- (id)copy
{
[self finishInitialization];
return [self copy];
}
/* From protocol OFMutableCopying */
- mutableCopy
- (id)mutableCopy
{
[self finishInitialization];
return [self mutableCopy];
}
/* From protocol OFComparing */
|
︙ | | |
Modified src/OFCountedSet.m
from [917f8ad622]
to [5a24ff85a6].
︙ | | |
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
|
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
|
-
+
-
+
-
+
-
+
-
-
+
+
-
-
+
+
-
+
-
+
-
+
|
Class isa;
} placeholder;
@interface OFCountedSet_placeholder: OFCountedSet
@end
@implementation OFCountedSet_placeholder
- init
- (instancetype)init
{
return (id)[[OFCountedSet_hashtable alloc] init];
}
- initWithSet: (OFSet *)set
- (instancetype)initWithSet: (OFSet *)set
{
return (id)[[OFCountedSet_hashtable alloc] initWithSet: set];
}
- initWithArray: (OFArray *)array
- (instancetype)initWithArray: (OFArray *)array
{
return (id)[[OFCountedSet_hashtable alloc] initWithArray: array];
}
- initWithObjects: (id)firstObject, ...
- (instancetype)initWithObjects: (id)firstObject, ...
{
id ret;
va_list arguments;
va_start(arguments, firstObject);
ret = [[OFCountedSet_hashtable alloc] initWithObject: firstObject
arguments: arguments];
va_end(arguments);
return ret;
}
- initWithObjects: (id const *)objects
count: (size_t)count
- (instancetype)initWithObjects: (id const *)objects
count: (size_t)count
{
return (id)[[OFCountedSet_hashtable alloc] initWithObjects: objects
count: count];
}
- initWithObject: (id)firstObject
arguments: (va_list)arguments
- (instancetype)initWithObject: (id)firstObject
arguments: (va_list)arguments
{
return (id)[[OFCountedSet_hashtable alloc] initWithObject: firstObject
arguments: arguments];
}
- initWithSerialization: (OFXMLElement *)element
- (instancetype)initWithSerialization: (OFXMLElement *)element
{
return (id)[[OFCountedSet_hashtable alloc]
initWithSerialization: element];
}
- retain
- (instancetype)retain
{
return self;
}
- autorelease
- (instancetype)autorelease
{
return self;
}
- (void)release
{
}
|
︙ | | |
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
|
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
|
-
+
-
+
|
@implementation OFCountedSet
+ (void)initialize
{
if (self == [OFCountedSet class])
placeholder.isa = [OFCountedSet_placeholder class];
}
+ alloc
+ (instancetype)alloc
{
if (self == [OFCountedSet class])
return (id)&placeholder;
return [super alloc];
}
- init
- (instancetype)init
{
if (object_getClass(self) == [OFCountedSet class]) {
@try {
[self doesNotRecognizeSelector: _cmd];
} @catch (id e) {
[self release];
@throw e;
|
︙ | | |
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
|
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
|
-
+
-
+
|
[ret makeImmutable];
objc_autoreleasePoolPop(pool);
return ret;
}
- copy
- (id)copy
{
return [[OFCountedSet alloc] initWithSet: self];
}
- mutableCopy
- (id)mutableCopy
{
return [[OFCountedSet alloc] initWithSet: self];
}
- (OFXMLElement *)XMLElementBySerializing
{
void *pool = objc_autoreleasePoolPush();
|
︙ | | |
Modified src/OFCountedSet_hashtable.m
from [0205b4710b]
to [534eb57128].
︙ | | |
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
-
+
|
@implementation OFCountedSet_hashtable
+ (void)initialize
{
if (self == [OFCountedSet_hashtable class])
[self inheritMethodsFromClass: [OFMutableSet_hashtable class]];
}
- initWithSet: (OFSet *)set
- (instancetype)initWithSet: (OFSet *)set
{
self = [self init];
@try {
void *pool = objc_autoreleasePoolPush();
if ([set isKindOfClass: [OFCountedSet class]]) {
|
︙ | | |
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
|
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
|
-
+
-
-
+
+
-
-
+
+
-
+
|
[self release];
@throw e;
}
return self;
}
- initWithArray: (OFArray *)array
- (instancetype)initWithArray: (OFArray *)array
{
self = [self init];
@try {
id const *objects = [array objects];
size_t count = [array count];
for (size_t i = 0; i < count; i++)
[self addObject: objects[i]];
} @catch (id e) {
[self release];
@throw e;
}
return self;
}
- initWithObjects: (id const *)objects
count: (size_t)count
- (instancetype)initWithObjects: (id const *)objects
count: (size_t)count
{
self = [self init];
@try {
for (size_t i = 0; i < count; i++)
[self addObject: objects[i]];
} @catch (id e) {
[self release];
@throw e;
}
return self;
}
- initWithObject: (id)firstObject
arguments: (va_list)arguments
- (instancetype)initWithObject: (id)firstObject
arguments: (va_list)arguments
{
self = [self init];
@try {
id object;
[self addObject: firstObject];
while ((object = va_arg(arguments, id)) != nil)
[self addObject: object];
} @catch (id e) {
[self release];
@throw e;
}
return self;
}
- initWithSerialization: (OFXMLElement *)element
- (instancetype)initWithSerialization: (OFXMLElement *)element
{
self = [self init];
@try {
void *pool = objc_autoreleasePoolPush();
if (![[element name] isEqual: @"OFCountedSet"] ||
|
︙ | | |
Modified src/OFData.h
from [9086a3be08]
to [3a6c360dd5].
︙ | | |
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
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
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
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
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
|
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
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
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
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
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
|
-
+
-
-
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
-
+
+
+
+
-
+
-
+
-
+
-
+
|
* the Base64-encoded string.
*
* @param string The string with the Base64-encoded data
* @return A new autoreleased OFData
*/
+ (instancetype)dataWithBase64EncodedString: (OFString *)string;
- init OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
/*!
* @brief Initialized an already allocated OFData with the specified `count`
* items of size 1.
*
* @param items The items to store in the OFData
* @param count The number of items
* @return An initialized OFData
*/
- initWithItems: (const void *)items
count: (size_t)count;
- (instancetype)initWithItems: (const void *)items
count: (size_t)count;
/*!
* @brief Initialized an already allocated OFData with the specified `count`
* items of the specified size.
*
* @param items The items to store in the OFData
* @param itemSize The item size of a single item in bytes
* @param count The number of items
* @return An initialized OFData
*/
- initWithItems: (const void *)items
itemSize: (size_t)itemSize
count: (size_t)count;
- (instancetype)initWithItems: (const void *)items
itemSize: (size_t)itemSize
count: (size_t)count;
/*!
* @brief Initializes an already allocated OFData with the specified `count`
* items of size 1 by taking over ownership of the specified items
* pointer.
*
* @param items The items to store in the OFData
* @param count The number of items
* @param freeWhenDone Whether to free the pointer when it is no longer needed
* by the OFData
* @return An initialized OFData
*/
- initWithItemsNoCopy: (const void *)items
count: (size_t)count
freeWhenDone: (bool)freeWhenDone;
- (instancetype)initWithItemsNoCopy: (const void *)items
count: (size_t)count
freeWhenDone: (bool)freeWhenDone;
/*!
* @brief Initializes an already allocated OFData with the specified `count`
* items of the specified size by taking ownership of the specified
* items pointer.
*
* @param items The items to store in the OFData
* @param itemSize The item size of a single item in bytes
* @param count The number of items
* @param freeWhenDone Whether to free the pointer when it is no longer needed
* by the OFData
* @return An initialized OFData
*/
- initWithItemsNoCopy: (const void *)items
itemSize: (size_t)itemSize
count: (size_t)count
freeWhenDone: (bool)freeWhenDone;
- (instancetype)initWithItemsNoCopy: (const void *)items
itemSize: (size_t)itemSize
count: (size_t)count
freeWhenDone: (bool)freeWhenDone;
#ifdef OF_HAVE_FILES
/*!
* @brief Initializes an already allocated OFData with an item size of 1,
* containing the data of the specified file.
*
* @param path The path of the file
* @return An initialized OFData
*/
- initWithContentsOfFile: (OFString *)path;
- (instancetype)initWithContentsOfFile: (OFString *)path;
#endif
#if defined(OF_HAVE_FILES) || defined(OF_HAVE_SOCKETS)
/*!
* @brief Initializes an already allocated OFData with an item size of 1,
* containing the data of the specified URL.
*
* @param URL The URL to the contents for the OFData
* @return A new autoreleased OFData
*/
- initWithContentsOfURL: (OFURL *)URL;
- (instancetype)initWithContentsOfURL: (OFURL *)URL;
#endif
/*!
* @brief Initializes an already allocated OFData with an item size of 1,
* containing the data of the string representation.
*
* @param string The string representation of the data
* @return A new autoreleased OFData
*/
- initWithStringRepresentation: (OFString *)string;
- (instancetype)initWithStringRepresentation: (OFString *)string;
/*!
* @brief Initializes an already allocated OFData with an item size of 1,
* containing the data of the Base64-encoded string.
*
* @param string The string with the Base64-encoded data
* @return An initialized OFData
*/
- initWithBase64EncodedString: (OFString *)string;
- (instancetype)initWithBase64EncodedString: (OFString *)string;
/*!
* @brief Returns the number of items in the OFData.
*
* @return The number of items in the OFData
*/
- (size_t)count;
|
︙ | | |
Modified src/OFData.m
from [74dd1893f5]
to [15a4b9e206].
︙ | | |
110
111
112
113
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
|
110
111
112
113
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
|
-
+
-
-
+
+
-
-
-
+
+
+
|
}
+ (instancetype)dataWithBase64EncodedString: (OFString *)string
{
return [[[self alloc] initWithBase64EncodedString: string] autorelease];
}
- init
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
- (instancetype)of_init
{
return [super init];
}
- initWithItems: (const void *)items
count: (size_t)count
- (instancetype)initWithItems: (const void *)items
count: (size_t)count
{
return [self initWithItems: items
itemSize: 1
count: count];
}
- initWithItems: (const void *)items
itemSize: (size_t)itemSize
count: (size_t)count
- (instancetype)initWithItems: (const void *)items
itemSize: (size_t)itemSize
count: (size_t)count
{
self = [super init];
@try {
if (itemSize == 0)
@throw [OFInvalidArgumentException exception];
|
︙ | | |
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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
|
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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
|
-
-
-
+
+
+
-
-
-
-
+
+
+
+
-
+
|
[self release];
@throw e;
}
return self;
}
- initWithItemsNoCopy: (const void *)items
count: (size_t)count
freeWhenDone: (bool)freeWhenDone
- (instancetype)initWithItemsNoCopy: (const void *)items
count: (size_t)count
freeWhenDone: (bool)freeWhenDone
{
return [self initWithItemsNoCopy: items
itemSize: 1
count: count
freeWhenDone: freeWhenDone];
}
- initWithItemsNoCopy: (const void *)items
itemSize: (size_t)itemSize
count: (size_t)count
freeWhenDone: (bool)freeWhenDone
- (instancetype)initWithItemsNoCopy: (const void *)items
itemSize: (size_t)itemSize
count: (size_t)count
freeWhenDone: (bool)freeWhenDone
{
self = [super init];
@try {
if (itemSize == 0)
@throw [OFInvalidArgumentException exception];
_items = (unsigned char *)items;
_itemSize = itemSize;
_count = count;
_freeWhenDone = freeWhenDone;
} @catch (id e) {
[self release];
@throw e;
}
return self;
}
#ifdef OF_HAVE_FILES
- initWithContentsOfFile: (OFString *)path
- (instancetype)initWithContentsOfFile: (OFString *)path
{
@try {
of_offset_t size = [[OFFileManager defaultManager]
sizeOfFileAtPath: path];
char *buffer;
if (sizeof(of_offset_t) > sizeof(size_t) &&
|
︙ | | |
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
|
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
|
-
+
|
}
return self;
}
#endif
#if defined(OF_HAVE_FILES) || defined(OF_HAVE_SOCKETS)
- initWithContentsOfURL: (OFURL *)URL
- (instancetype)initWithContentsOfURL: (OFURL *)URL
{
void *pool;
OFString *scheme;
pool = objc_autoreleasePoolPush();
scheme = [URL scheme];
|
︙ | | |
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
|
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
|
-
+
|
objc_autoreleasePoolPop(pool);
return self;
}
#endif
- initWithStringRepresentation: (OFString *)string
- (instancetype)initWithStringRepresentation: (OFString *)string
{
self = [super init];
@try {
size_t count = [string
cStringLengthWithEncoding: OF_STRING_ENCODING_ASCII];
const char *cString;
|
︙ | | |
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
|
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
|
-
+
|
[self release];
@throw e;
}
return self;
}
- initWithBase64EncodedString: (OFString *)string
- (instancetype)initWithBase64EncodedString: (OFString *)string
{
bool mutable = [self isKindOfClass: [OFMutableData class]];
if (!mutable) {
[self release];
self = [OFMutableData alloc];
}
|
︙ | | |
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
|
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
|
-
+
|
if (!mutable)
[(OFMutableData *)self makeImmutable];
return self;
}
- initWithSerialization: (OFXMLElement *)element
- (instancetype)initWithSerialization: (OFXMLElement *)element
{
@try {
void *pool = objc_autoreleasePoolPush();
OFString *stringValue;
if (![[element name] isEqual: [self className]] ||
![[element namespace] isEqual: OF_SERIALIZATION_NS])
|
︙ | | |
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
|
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
|
-
+
-
+
|
{
if (_items == NULL || _count == 0)
return NULL;
return _items + (_count - 1) * _itemSize;
}
- copy
- (id)copy
{
return [self retain];
}
- mutableCopy
- (id)mutableCopy
{
return [[OFMutableData alloc] initWithItems: _items
itemSize: _itemSize
count: _count];
}
- (bool)isEqual: (id)object
|
︙ | | |
Modified src/OFDate.h
from [29c60ccceb]
to [728f213f2d].
︙ | | |
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
|
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
|
-
+
-
+
-
-
+
+
-
-
+
+
|
/*!
* @brief Initializes an already allocated OFDate with the specified date and
* time since 1970-01-01T00:00:00Z.
*
* @param seconds The seconds since 1970-01-01T00:00:00Z
* @return An initialized OFDate with the specified date and time
*/
- initWithTimeIntervalSince1970: (of_time_interval_t)seconds;
- (instancetype)initWithTimeIntervalSince1970: (of_time_interval_t)seconds;
/*!
* @brief Initializes an already allocated OFDate with the specified date and
* time since now.
*
* @param seconds The seconds since now
* @return An initialized OFDate with the specified date and time
*/
- initWithTimeIntervalSinceNow: (of_time_interval_t)seconds;
- (instancetype)initWithTimeIntervalSinceNow: (of_time_interval_t)seconds;
/*!
* @brief Initializes an already allocated OFDate with the specified string in
* the specified format.
*
* The time zone used is UTC. If a time zone is specified anyway, an
* OFInvalidFormatException is thrown. See @ref initWithLocalDateString:format:
* if you want to specify a time zone.
*
* See the man page for `strftime` for information on the format.
*
* @warning The format is currently limited to the following format specifiers:
* %%d, %%e, %%H, %%m, %%M, %%S, %%y, %%Y, %%, %%n and %%t.
*
* @param string The string describing the date
* @param format The format of the string describing the date
* @return An initialized OFDate with the specified date and time
*/
- initWithDateString: (OFString *)string
format: (OFString *)format;
- (instancetype)initWithDateString: (OFString *)string
format: (OFString *)format;
/*!
* @brief Initializes an already allocated OFDate with the specified string in
* the specified format.
*
* If no time zone is specified, local time is assumed.
*
* See the man page for `strftime` for information on the format.
*
* @warning The format is currently limited to the following format specifiers:
* %%d, %%e, %%H, %%m, %%M, %%S, %%y, %%Y, %%, %%n and %%t.
*
* @param string The string describing the date
* @param format The format of the string describing the date
* @return An initialized OFDate with the specified date and time
*/
- initWithLocalDateString: (OFString *)string
format: (OFString *)format;
- (instancetype)initWithLocalDateString: (OFString *)string
format: (OFString *)format;
/*!
* @brief Returns the microsecond of the date.
*
* @return The microsecond of the date
*/
- (uint32_t)microsecond;
|
︙ | | |
Modified src/OFDate.m
from [618922b043]
to [f5a435fe1e].
︙ | | |
227
228
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
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
|
227
228
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
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
|
-
+
-
+
-
+
-
-
+
+
|
+ (instancetype)distantPast
{
return [[[self alloc]
initWithTimeIntervalSince1970: -62167219200.0] autorelease];
}
- init
- (instancetype)init
{
struct timeval t;
self = [super init];
OF_ENSURE(gettimeofday(&t, NULL) == 0);
_seconds = t.tv_sec;
_seconds += (of_time_interval_t)t.tv_usec / 1000000;
return self;
}
- initWithTimeIntervalSince1970: (of_time_interval_t)seconds
- (instancetype)initWithTimeIntervalSince1970: (of_time_interval_t)seconds
{
self = [super init];
_seconds = seconds;
return self;
}
- initWithTimeIntervalSinceNow: (of_time_interval_t)seconds
- (instancetype)initWithTimeIntervalSinceNow: (of_time_interval_t)seconds
{
self = [self init];
_seconds += seconds;
return self;
}
- initWithDateString: (OFString *)string
format: (OFString *)format
- (instancetype)initWithDateString: (OFString *)string
format: (OFString *)format
{
self = [super init];
@try {
const char *UTF8String = [string UTF8String];
struct tm tm = { 0 };
int16_t tz = 0;
|
︙ | | |
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
|
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
|
-
-
+
+
|
[self release];
@throw e;
}
return self;
}
- initWithLocalDateString: (OFString *)string
format: (OFString *)format
- (instancetype)initWithLocalDateString: (OFString *)string
format: (OFString *)format
{
self = [super init];
@try {
const char *UTF8String = [string UTF8String];
struct tm tm = { 0 };
/*
|
︙ | | |
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
|
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
|
-
+
|
[self release];
@throw e;
}
return self;
}
- initWithSerialization: (OFXMLElement *)element
- (instancetype)initWithSerialization: (OFXMLElement *)element
{
self = [super init];
@try {
void *pool = objc_autoreleasePoolPush();
union {
double d;
|
︙ | | |
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
|
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
|
-
+
|
OF_HASH_ADD(hash, d.b[i]);
OF_HASH_FINALIZE(hash);
return hash;
}
- copy
- (id)copy
{
return [self retain];
}
- (of_comparison_result_t)compare: (id <OFComparing>)object
{
OFDate *otherDate;
|
︙ | | |
Modified src/OFDictionary.h
from [085a75867d]
to [72d79ae93c].
︙ | | |
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
|
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
|
-
+
-
-
+
+
-
-
+
+
-
-
-
+
+
+
-
+
-
-
+
+
|
/*!
* @brief Initializes an already allocated OFDictionary with the specified
* OFDictionary.
*
* @param dictionary An OFDictionary
* @return An initialized OFDictionary
*/
- initWithDictionary:
- (instancetype)initWithDictionary:
(OFDictionary OF_GENERIC(KeyType, ObjectType) *)dictionary;
/*!
* @brief Initializes an already allocated OFDictionary with the specified key
* and object.
*
* @param key The key
* @param object The object
* @return An initialized OFDictionary
*/
- initWithObject: (ObjectType)object
forKey: (KeyType)key;
- (instancetype)initWithObject: (ObjectType)object
forKey: (KeyType)key;
/*!
* @brief Initializes an already allocated OFDictionary with the specified keys
* and objects.
*
* @param keys An array of keys
* @param objects An array of objects
* @return An initialized OFDictionary
*/
- initWithObjects: (OFArray OF_GENERIC(ObjectType) *)objects
forKeys: (OFArray OF_GENERIC(KeyType) *)keys;
- (instancetype)initWithObjects: (OFArray OF_GENERIC(ObjectType) *)objects
forKeys: (OFArray OF_GENERIC(KeyType) *)keys;
/*!
* @brief Initializes an already allocated OFDictionary with the specified keys
* and objects.
*
* @param keys An array of keys
* @param objects An array of objects
* @param count The number of objects in the arrays
* @return An initialized OFDictionary
*/
- initWithObjects: (ObjectType const _Nonnull *_Nonnull)objects
forKeys: (KeyType const _Nonnull *_Nonnull)keys
count: (size_t)count;
- (instancetype)initWithObjects: (ObjectType const _Nonnull *_Nonnull)objects
forKeys: (KeyType const _Nonnull *_Nonnull)keys
count: (size_t)count;
/*!
* @brief Initializes an already allocated OFDictionary with the specified keys
* and objects.
*
* @param firstKey The first key
* @return An initialized OFDictionary
*/
- initWithKeysAndObjects: (KeyType)firstKey, ... OF_SENTINEL;
- (instancetype)initWithKeysAndObjects: (KeyType)firstKey, ... OF_SENTINEL;
/*!
* @brief Initializes an already allocated OFDictionary with the specified key
* and va_list.
*
* @param firstKey The first key
* @param arguments A va_list of the other arguments
* @return An initialized OFDictionary
*/
- initWithKey: (KeyType)firstKey
arguments: (va_list)arguments;
- (instancetype)initWithKey: (KeyType)firstKey
arguments: (va_list)arguments;
/*!
* @brief Returns the object for the given key or `nil` if the key was not
* found.
*
* @warning The returned object is *not* retained and autoreleased for
* performance reasons!
|
︙ | | |
Modified src/OFDictionary.m
from [bd2dcff559]
to [21f0c3f7c0].
︙ | | |
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
|
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
|
-
+
-
+
-
-
+
+
-
-
+
+
-
-
-
+
+
+
-
+
-
-
+
+
-
+
-
+
-
+
|
depth: (size_t)depth;
@end
@interface OFDictionary_placeholder: OFDictionary
@end
@implementation OFDictionary_placeholder
- init
- (instancetype)init
{
return (id)[[OFDictionary_hashtable alloc] init];
}
- initWithDictionary: (OFDictionary *)dictionary
- (instancetype)initWithDictionary: (OFDictionary *)dictionary
{
return (id)[[OFDictionary_hashtable alloc]
initWithDictionary: dictionary];
}
- initWithObject: (id)object
forKey: (id)key
- (instancetype)initWithObject: (id)object
forKey: (id)key
{
return (id)[[OFDictionary_hashtable alloc] initWithObject: object
forKey: key];
}
- initWithObjects: (OFArray *)objects
forKeys: (OFArray *)keys
- (instancetype)initWithObjects: (OFArray *)objects
forKeys: (OFArray *)keys
{
return (id)[[OFDictionary_hashtable alloc] initWithObjects: objects
forKeys: keys];
}
- initWithObjects: (id const *)objects
forKeys: (id const *)keys
count: (size_t)count
- (instancetype)initWithObjects: (id const *)objects
forKeys: (id const *)keys
count: (size_t)count
{
return (id)[[OFDictionary_hashtable alloc] initWithObjects: objects
forKeys: keys
count: count];
}
- initWithKeysAndObjects: (id <OFCopying>)firstKey, ...
- (instancetype)initWithKeysAndObjects: (id <OFCopying>)firstKey, ...
{
id ret;
va_list arguments;
va_start(arguments, firstKey);
ret = [[OFDictionary_hashtable alloc] initWithKey: firstKey
arguments: arguments];
va_end(arguments);
return ret;
}
- initWithKey: (id <OFCopying>)firstKey
arguments: (va_list)arguments
- (instancetype)initWithKey: (id <OFCopying>)firstKey
arguments: (va_list)arguments
{
return (id)[[OFDictionary_hashtable alloc] initWithKey: firstKey
arguments: arguments];
}
- initWithSerialization: (OFXMLElement *)element
- (instancetype)initWithSerialization: (OFXMLElement *)element
{
return (id)[[OFDictionary_hashtable alloc]
initWithSerialization: element];
}
- retain
- (instancetype)retain
{
return self;
}
- autorelease
- (instancetype)autorelease
{
return self;
}
- (void)release
{
}
|
︙ | | |
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
|
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
|
-
+
|
@implementation OFDictionary
+ (void)initialize
{
if (self == [OFDictionary class])
placeholder.isa = [OFDictionary_placeholder class];
}
+ alloc
+ (instancetype)alloc
{
if (self == [OFDictionary class])
return (id)&placeholder;
return [super alloc];
}
|
︙ | | |
181
182
183
184
185
186
187
188
189
190
191
192
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
|
181
182
183
184
185
186
187
188
189
190
191
192
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
|
-
+
-
+
-
-
+
+
-
-
+
+
|
ret = [[[self alloc] initWithKey: firstKey
arguments: arguments] autorelease];
va_end(arguments);
return ret;
}
- init
- (instancetype)init
{
if (object_getClass(self) == [OFDictionary class]) {
@try {
[self doesNotRecognizeSelector: _cmd];
} @catch (id e) {
[self release];
@throw e;
}
abort();
}
return [super init];
}
- initWithDictionary: (OFDictionary *)dictionary
- (instancetype)initWithDictionary: (OFDictionary *)dictionary
{
OF_INVALID_INIT_METHOD
}
- initWithObject: (id)object
forKey: (id)key
- (instancetype)initWithObject: (id)object
forKey: (id)key
{
if (key == nil || object == nil)
@throw [OFInvalidArgumentException exception];
return [self initWithKeysAndObjects: key, object, nil];
}
- initWithObjects: (OFArray *)objects_
forKeys: (OFArray *)keys_
- (instancetype)initWithObjects: (OFArray *)objects_
forKeys: (OFArray *)keys_
{
id const *objects, *keys;
size_t count;
@try {
count = [objects_ count];
|
︙ | | |
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
|
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
|
-
-
-
+
+
+
-
+
-
-
+
+
-
+
|
}
return [self initWithObjects: objects
forKeys: keys
count: count];
}
- initWithObjects: (id const *)objects
forKeys: (id const *)keys
count: (size_t)count
- (instancetype)initWithObjects: (id const *)objects
forKeys: (id const *)keys
count: (size_t)count
{
OF_INVALID_INIT_METHOD
}
- initWithKeysAndObjects: (id)firstKey, ...
- (instancetype)initWithKeysAndObjects: (id)firstKey, ...
{
id ret;
va_list arguments;
va_start(arguments, firstKey);
ret = [self initWithKey: firstKey
arguments: arguments];
va_end(arguments);
return ret;
}
- initWithKey: (id)firstKey
arguments: (va_list)arguments
- (instancetype)initWithKey: (id)firstKey
arguments: (va_list)arguments
{
OF_INVALID_INIT_METHOD
}
- initWithSerialization: (OFXMLElement *)element
- (instancetype)initWithSerialization: (OFXMLElement *)element
{
OF_INVALID_INIT_METHOD
}
- (id)objectForKey: (id)key
{
OF_UNRECOGNIZED_SELECTOR
|
︙ | | |
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
|
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
|
-
+
-
+
|
}
- (size_t)count
{
OF_UNRECOGNIZED_SELECTOR
}
- copy
- (id)copy
{
return [self retain];
}
- mutableCopy
- (id)mutableCopy
{
return [[OFMutableDictionary alloc] initWithDictionary: self];
}
- (bool)isEqual: (id)object
{
OFDictionary *otherDictionary;
|
︙ | | |
Modified src/OFDictionary_hashtable.h
from [2dabff3043]
to [a2db9eb8be].
︙ | | |
22
23
24
25
26
27
28
29
30
31
32
|
22
23
24
25
26
27
28
29
30
31
32
|
-
+
|
@class OFMapTableEnumerator;
@interface OFDictionary_hashtable: OFDictionary
{
OFMapTable *_mapTable;
}
- initWithCapacity: (size_t)capacity;
- (instancetype)initWithCapacity: (size_t)capacity;
@end
OF_ASSUME_NONNULL_END
|
Modified src/OFDictionary_hashtable.m
from [6d5e327cda]
to [4b2eb176eb].
︙ | | |
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
|
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
|
-
+
-
+
-
+
|
.retain = retain,
.release = release,
.hash = hash,
.equal = equal
};
@implementation OFDictionary_hashtable
- init
- (instancetype)init
{
return [self initWithCapacity: 0];
}
- initWithCapacity: (size_t)capacity
- (instancetype)initWithCapacity: (size_t)capacity
{
self = [super init];
@try {
_mapTable = [[OFMapTable alloc]
initWithKeyFunctions: keyFunctions
objectFunctions: objectFunctions
capacity: capacity];
} @catch (id e) {
[self release];
@throw e;
}
return self;
}
- initWithDictionary: (OFDictionary *)dictionary
- (instancetype)initWithDictionary: (OFDictionary *)dictionary
{
size_t count;
if (dictionary == nil)
return [self init];
if ([dictionary isKindOfClass: [OFDictionary_hashtable class]] ||
|
︙ | | |
146
147
148
149
150
151
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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
|
146
147
148
149
150
151
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
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
|
-
-
+
+
-
-
-
+
+
+
-
-
+
+
|
[self release];
@throw e;
}
return self;
}
- initWithObject: (id)object
forKey: (id)key
- (instancetype)initWithObject: (id)object
forKey: (id)key
{
self = [self initWithCapacity: 1];
@try {
[_mapTable setObject: object
forKey: key];
} @catch (id e) {
[self release];
@throw e;
}
return self;
}
- initWithObjects: (id const *)objects
forKeys: (id const *)keys
count: (size_t)count
- (instancetype)initWithObjects: (id const *)objects
forKeys: (id const *)keys
count: (size_t)count
{
self = [self initWithCapacity: count];
@try {
size_t i;
for (i = 0; i < count; i++)
[_mapTable setObject: objects[i]
forKey: keys[i]];
} @catch (id e) {
[self release];
@throw e;
}
return self;
}
- initWithKey: (id)firstKey
arguments: (va_list)arguments
- (instancetype)initWithKey: (id)firstKey
arguments: (va_list)arguments
{
self = [super init];
@try {
va_list argumentsCopy;
id key, object;
size_t i, count;
|
︙ | | |
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
|
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
|
-
+
|
[self release];
@throw e;
}
return self;
}
- initWithSerialization: (OFXMLElement *)element
- (instancetype)initWithSerialization: (OFXMLElement *)element
{
self = [super init];
@try {
void *pool = objc_autoreleasePoolPush();
OFArray *keys, *objects;
OFEnumerator *keyEnumerator, *objectEnumerator;
|
︙ | | |
Modified src/OFEnumerator.m
from [73c62897f9]
to [eea750ef77].
︙ | | |
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
-
+
|
#include <stdlib.h>
#import "OFEnumerator.h"
#import "OFArray.h"
@implementation OFEnumerator
- init
- (instancetype)init
{
if (object_getClass(self) == [OFEnumerator class]) {
@try {
[self doesNotRecognizeSelector: _cmd];
abort();
} @catch (id e) {
[self release];
|
︙ | | |
Modified src/OFFile.h
from [cba6c42a3b]
to [a78b15002c].
︙ | | |
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
-
+
|
* @param handle A native file handle. If OF_FILE_HANDLE_IS_FD is defined, this
* is a file descriptor. The handle is closed when the OFFile
* object is deallocated!
* @return A new autoreleased OFFile
*/
+ (instancetype)fileWithHandle: (of_file_handle_t)handle;
- init OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
/*!
* @brief Initializes an already allocated OFFile.
*
* @param path The path to the file to open as a string
* @param mode The mode in which the file should be opened.@n
* Possible modes are:
|
︙ | | |
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
|
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
|
-
-
+
+
-
+
+
|
* `wb+` or `w+b` | read-write, create, truncate, binary
* `a` | write-only, create, append
* `ab` | write-only, create, append, binary
* `a+` | read-write, create, append
* `ab+` or `a+b` | read-write, create, append, binary
* @return An initialized OFFile
*/
- initWithPath: (OFString *)path
mode: (OFString *)mode;
- (instancetype)initWithPath: (OFString *)path
mode: (OFString *)mode;
/*!
* @brief Initializes an already allocated OFFile.
*
* @param handle A native file handle. If OF_FILE_HANDLE_IS_FD is defined, this
* is a file descriptor. The handle is closed when the OFFile
* object is deallocated!
* @return An initialized OFFile
*/
- initWithHandle: (of_file_handle_t)handle OF_DESIGNATED_INITIALIZER;
- (instancetype)initWithHandle: (of_file_handle_t)handle
OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|
Modified src/OFFile.m
from [cd9a853dd9]
to [3ace3f34b9].
︙ | | |
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
|
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
|
-
+
-
-
+
+
|
}
+ (instancetype)fileWithHandle: (of_file_handle_t)handle
{
return [[[self alloc] initWithHandle: handle] autorelease];
}
- init
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
- initWithPath: (OFString *)path
mode: (OFString *)mode
- (instancetype)initWithPath: (OFString *)path
mode: (OFString *)mode
{
of_file_handle_t handle;
@try {
void *pool = objc_autoreleasePoolPush();
int flags;
|
︙ | | |
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
|
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
|
-
+
|
closeHandle(handle);
@throw e;
}
return self;
}
- initWithHandle: (of_file_handle_t)handle
- (instancetype)initWithHandle: (of_file_handle_t)handle
{
self = [super init];
_handle = handle;
return self;
}
|
︙ | | |
Modified src/OFGZIPStream.h
from [150ed8cd99]
to [8e5bebccb2].
︙ | | |
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
|
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
|
-
+
-
-
+
+
|
* @param mode The mode for the OFGZIPStream. Valid modes are "r" for reading
* and "w" for writing.
* @return A new, autoreleased OFGZIPStream
*/
+ (instancetype)streamWithStream: (OFStream *)stream
mode: (OFString *)mode;
- init OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
/*!
* @brief Initializes an already allocated OFGZIPStream with the specified
* underlying stream.
*
* @param stream The underlying stream for the OFGZIPStream
* @param mode The mode for the OFGZIPStream. Valid modes are "r" for reading
* and "w" for writing.
* @return An initialized OFGZIPStream
*/
- initWithStream: (OFStream *)stream
mode: (OFString *)mode OF_DESIGNATED_INITIALIZER;
- (instancetype)initWithStream: (OFStream *)stream
mode: (OFString *)mode OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|
Modified src/OFGZIPStream.m
from [99b0bbcaa7]
to [4ca40a79fe].
︙ | | |
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
-
+
-
-
+
+
|
+ (instancetype)streamWithStream: (OFStream *)stream
mode: (OFString *)mode
{
return [[[self alloc] initWithStream: stream
mode: mode] autorelease];
}
- init
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
- initWithStream: (OFStream *)stream
mode: (OFString *)mode
- (instancetype)initWithStream: (OFStream *)stream
mode: (OFString *)mode
{
self = [super init];
@try {
if (![mode isEqual: @"r"])
@throw [OFNotImplementedException
exceptionWithSelector: _cmd
|
︙ | | |
Modified src/OFHMAC.h
from [10fea24a9c]
to [aaa867eca5].
︙ | | |
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
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
|
-
+
-
+
+
|
* @brief Returns a new OFHMAC with the specified hashing algorithm.
*
* @param hashClass The class of the hashing algorithm
* @return A new, autoreleased OFHMAC
*/
+ (instancetype)HMACWithHashClass: (Class <OFCryptoHash>)hashClass;
- init OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
/*!
* @brief Initialized an already allocated OFHMAC with the specified hashing
* algorithm.
*
* @param hashClass The class of the hashing algorithm
* @return An initialized OFHMAC
*/
- initWithHashClass: (Class <OFCryptoHash>)hashClass OF_DESIGNATED_INITIALIZER;
- (instancetype)initWithHashClass: (Class <OFCryptoHash>)hashClass
OF_DESIGNATED_INITIALIZER;
/*!
* @brief Sets the key for the HMAC.
*
* @note This resets the HMAC!
*
* @warning This invalidates any pointer previously returned by @ref digest. If
|
︙ | | |
Modified src/OFHMAC.m
from [298535fc6e]
to [7f94007b12].
︙ | | |
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
|
-
+
-
+
|
@synthesize hashClass = _hashClass;
+ (instancetype)HMACWithHashClass: (Class <OFCryptoHash>)class
{
return [[[self alloc] initWithHashClass: class] autorelease];
}
- init
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
- initWithHashClass: (Class <OFCryptoHash>)class
- (instancetype)initWithHashClass: (Class <OFCryptoHash>)class
{
self = [super init];
_hashClass = class;
return self;
}
|
︙ | | |
Modified src/OFHTTPClient.m
from [3385dc4745]
to [901849c7c7].
︙ | | |
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
|
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
|
-
-
-
-
+
+
+
+
-
+
|
id _context;
bool _firstLine;
OFString *_version;
int _status;
OFMutableDictionary OF_GENERIC(OFString *, OFString *) *_serverHeaders;
}
- initWithClient: (OFHTTPClient *)client
request: (OFHTTPRequest *)request
redirects: (unsigned int)redirects
context: (id)context;
- (instancetype)initWithClient: (OFHTTPClient *)client
request: (OFHTTPRequest *)request
redirects: (unsigned int)redirects
context: (id)context;
- (void)start;
- (void)closeAndReconnect;
@end
@interface OFHTTPClientResponse: OFHTTPResponse
{
OFTCPSocket *_socket;
bool _hasContentLength, _chunked, _keepAlive, _atEndOfStream;
size_t _toRead;
}
@property (nonatomic, setter=of_setKeepAlive:) bool of_keepAlive;
- initWithSocket: (OFTCPSocket *)socket;
- (instancetype)initWithSocket: (OFTCPSocket *)socket;
@end
static OFString *
constructRequestString(OFHTTPRequest *request)
{
void *pool = objc_autoreleasePoolPush();
of_http_request_method_t method = [request method];
|
︙ | | |
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
|
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
|
-
-
-
-
+
+
+
+
|
firstLetter = false;
str++;
}
}
@implementation OFHTTPClientRequestHandler
- initWithClient: (OFHTTPClient *)client
request: (OFHTTPRequest *)request
redirects: (unsigned int)redirects
context: (id)context
- (instancetype)initWithClient: (OFHTTPClient *)client
request: (OFHTTPRequest *)request
redirects: (unsigned int)redirects
context: (id)context
{
self = [super init];
@try {
_client = [client retain];
_request = [request retain];
_redirects = redirects;
|
︙ | | |
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
|
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
|
-
+
|
context: nil];
}
@end
@implementation OFHTTPClientResponse
@synthesize of_keepAlive = _keepAlive;
- initWithSocket: (OFTCPSocket *)socket
- (instancetype)initWithSocket: (OFTCPSocket *)socket
{
self = [super init];
_socket = [socket retain];
return self;
}
|
︙ | | |
Modified src/OFHTTPCookie.h
from [947333b8e3]
to [3e83910dd6].
︙ | | |
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
|
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
|
-
+
-
-
-
+
+
+
|
* @param domain The domain for the cookie
* @return A new, autoreleased OFHTTPCookie
*/
+ (instancetype)cookieWithName: (OFString *)name
value: (OFString *)value
domain: (OFString *)domain;
- init OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
/*!
* @brief Initializes an already allocated new cookie with the specified name
* and value.
*
* @param name The name of the cookie
* @param value The value of the cookie
* @param domain The domain for the cookie
* @return An initialized OFHTTPCookie
*/
- initWithName: (OFString *)name
value: (OFString *)value
domain: (OFString *)domain OF_DESIGNATED_INITIALIZER;
- (instancetype)initWithName: (OFString *)name
value: (OFString *)value
domain: (OFString *)domain OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|
Modified src/OFHTTPCookie.m
from [13073ad757]
to [e5c1061662].
︙ | | |
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
|
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
|
-
+
-
-
-
+
+
+
|
domain: (OFString *)domain
{
return [[[self alloc] initWithName: name
value: value
domain: domain] autorelease];
}
- init
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
- initWithName: (OFString *)name
value: (OFString *)value
domain: (OFString *)domain
- (instancetype)initWithName: (OFString *)name
value: (OFString *)value
domain: (OFString *)domain
{
self = [super init];
@try {
_name = [name copy];
_value = [value copy];
_domain = [domain copy];
|
︙ | | |
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
|
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
|
-
+
|
OF_HASH_ADD(hash, _HTTPOnly);
OF_HASH_ADD_HASH(hash, [_extensions hash]);
OF_HASH_FINALIZE(hash);
return hash;
}
- copy
- (id)copy
{
OFHTTPCookie *copy = [[OFHTTPCookie alloc] initWithName: _name
value: _value
domain: _domain];
@try {
copy->_path = [_path copy];
|
︙ | | |
Modified src/OFHTTPCookieManager.m
from [7266c82110]
to [69c2e4795d].
︙ | | |
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
-
+
|
@implementation OFHTTPCookieManager
+ (instancetype)manager
{
return [[[self alloc] init] autorelease];
}
- init
- (instancetype)init
{
self = [super init];
@try {
_cookies = [[OFMutableArray alloc] init];
} @catch (id e) {
[self release];
|
︙ | | |
Modified src/OFHTTPRequest.h
from [bae740e132]
to [c4033f68e4].
︙ | | |
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
|
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
|
-
+
|
/*!
* @brief Initializes an already allocated OFHTTPRequest with the specified URL.
*
* @param URL The URL for the request
* @return An initialized OFHTTPRequest
*/
- initWithURL: (OFURL *)URL;
- (instancetype)initWithURL: (OFURL *)URL;
/*!
* @brief Sets the protocol version of the HTTP request.
*
* @param protocolVersion The protocol version of the HTTP request
*/
- (void)setProtocolVersion: (of_http_request_protocol_version_t)protocolVersion;
|
︙ | | |
Modified src/OFHTTPRequest.m
from [a914d1de62]
to [33eb5fdd58].
︙ | | |
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
|
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
|
-
+
-
+
|
}
+ (instancetype)requestWithURL: (OFURL *)URL
{
return [[[self alloc] initWithURL: URL] autorelease];
}
- init
- (instancetype)init
{
self = [super init];
_method = OF_HTTP_REQUEST_METHOD_GET;
_protocolVersion.major = 1;
_protocolVersion.minor = 1;
return self;
}
- initWithURL: (OFURL *)URL
- (instancetype)initWithURL: (OFURL *)URL
{
self = [self init];
@try {
_URL = [URL copy];
} @catch (id e) {
[self release];
|
︙ | | |
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
|
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
|
-
+
|
[_headers release];
[_body release];
[_remoteAddress release];
[super dealloc];
}
- copy
- (id)copy
{
OFHTTPRequest *copy = [[OFHTTPRequest alloc] init];
@try {
copy->_method = _method;
copy->_protocolVersion = _protocolVersion;
[copy setURL: _URL];
|
︙ | | |
Modified src/OFHTTPResponse.m
from [78fcbe257c]
to [f46d462637].
︙ | | |
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
|
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
|
-
+
|
return ret;
}
@implementation OFHTTPResponse
@synthesize statusCode = _statusCode, headers = _headers;
- init
- (instancetype)init
{
self = [super init];
@try {
_protocolVersion.major = 1;
_protocolVersion.minor = 1;
_headers = [[OFDictionary alloc] init];
|
︙ | | |
Modified src/OFHTTPServer.m
from [1e27dfeb94]
to [339d905a8d].
︙ | | |
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
|
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
|
-
-
-
+
+
+
-
-
-
+
+
+
|
{
OFTCPSocket *_socket;
OFHTTPServer *_server;
OFHTTPRequest *_request;
bool _chunked, _headersSent;
}
- initWithSocket: (OFTCPSocket *)socket
server: (OFHTTPServer *)server
request: (OFHTTPRequest *)request;
- (instancetype)initWithSocket: (OFTCPSocket *)socket
server: (OFHTTPServer *)server
request: (OFHTTPRequest *)request;
@end
@implementation OFHTTPServerResponse
- initWithSocket: (OFTCPSocket *)socket
server: (OFHTTPServer *)server
request: (OFHTTPRequest *)request
- (instancetype)initWithSocket: (OFTCPSocket *)socket
server: (OFHTTPServer *)server
request: (OFHTTPRequest *)request
{
self = [super init];
_statusCode = 500;
_socket = [socket retain];
_server = [server retain];
_request = [request retain];
|
︙ | | |
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
|
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
|
-
-
+
+
-
-
+
+
|
OFString *_host, *_path;
uint16_t _port;
OFMutableDictionary *_headers;
size_t _contentLength;
OFMutableData *_body;
}
- initWithSocket: (OFTCPSocket *)socket
server: (OFHTTPServer *)server;
- (instancetype)initWithSocket: (OFTCPSocket *)socket
server: (OFHTTPServer *)server;
- (bool)socket: (OFTCPSocket *)socket
didReadLine: (OFString *)line
context: (id)context
exception: (id)exception;
- (bool)parseProlog: (OFString *)line;
- (bool)parseHeaders: (OFString *)line;
- (bool)socket: (OFTCPSocket *)socket
didReadIntoBuffer: (char *)buffer
length: (size_t)length
context: (id)context
exception: (id)exception;
- (bool)sendErrorAndClose: (short)statusCode;
- (void)createResponse;
@end
@implementation OFHTTPServer_Connection
- initWithSocket: (OFTCPSocket *)socket
server: (OFHTTPServer *)server
- (instancetype)initWithSocket: (OFTCPSocket *)socket
server: (OFHTTPServer *)server
{
self = [super init];
@try {
_socket = [socket retain];
_server = [server retain];
_timer = [[OFTimer
|
︙ | | |
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
|
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
|
-
+
|
@synthesize host = _host, port = _port, delegate = _delegate, name = _name;
+ (instancetype)server
{
return [[[self alloc] init] autorelease];
}
- init
- (instancetype)init
{
self = [super init];
_name = @"OFHTTPServer (ObjFW's HTTP server class "
@"<https://heap.zone/objfw/>)";
return self;
|
︙ | | |
Modified src/OFINICategory.h
from [34c49be172]
to [729eb91da7].
︙ | | |
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
-
+
|
}
/*!
* The name of the INI category
*/
@property (copy, nonatomic) OFString *name;
- init OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
/*!
* @brief Returns the string value for the specified key, or `nil` if it does
* not exist.
*
* If the specified key is a multi-key (see @ref arrayForKey:), the value of
* the first key/value pair found is returned.
|
︙ | | |
Modified src/OFINICategory.m
from [95cd2a6086]
to [707902fb61].
︙ | | |
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
|
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
|
-
+
|
[self release];
@throw e;
}
return self;
}
- init
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
- (void)dealloc
{
[_name release];
|
︙ | | |
Modified src/OFINIFile.h
from [80cc8bd83f]
to [40d24517e7].
︙ | | |
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
|
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
|
-
+
-
+
-
-
+
+
+
|
* @param encoding The encoding of the specified file
*
* @return A new, autoreleased OFINIFile with the contents of the specified file
*/
+ (instancetype)fileWithPath: (OFString *)path
encoding: (of_string_encoding_t)encoding;
- init OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
/*!
* @brief Initializes an already allocated OFINIFile with the contents of the
* specified file.
*
* @param path The path to the file whose contents the OFINIFile should contain
*
* @return An initialized OFINIFile with the contents of the specified file
*/
- initWithPath: (OFString *)path;
- (instancetype)initWithPath: (OFString *)path;
/*!
* @brief Initializes an already allocated OFINIFile with the contents of the
* specified file in the specified encoding.
*
* @param path The path to the file whose contents the OFINIFile should contain
* @param encoding The encoding of the specified file
*
* @return An initialized OFINIFile with the contents of the specified file
*/
- initWithPath: (OFString *)path
encoding: (of_string_encoding_t)encoding OF_DESIGNATED_INITIALIZER;
- (instancetype)initWithPath: (OFString *)path
encoding: (of_string_encoding_t)encoding
OF_DESIGNATED_INITIALIZER;
/*!
* @brief Returns an @ref OFINICategory for the category with the specified
* name.
*
* @param name The name of the category for which an @ref OFINICategory should
* be returned
|
︙ | | |
Modified src/OFINIFile.m
from [01663115e7]
to [5ec2ba6da2].
︙ | | |
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
|
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
|
-
+
-
+
-
-
+
+
|
+ (instancetype)fileWithPath: (OFString *)path
encoding: (of_string_encoding_t)encoding
{
return [[[self alloc] initWithPath: path
encoding: encoding] autorelease];
}
- init
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
- initWithPath: (OFString *)path
- (instancetype)initWithPath: (OFString *)path
{
return [self initWithPath: path
encoding: OF_STRING_ENCODING_UTF_8];
}
- initWithPath: (OFString *)path
encoding: (of_string_encoding_t)encoding
- (instancetype)initWithPath: (OFString *)path
encoding: (of_string_encoding_t)encoding
{
self = [super init];
@try {
_categories = [[OFMutableArray alloc] init];
[self of_parseFile: path
|
︙ | | |
Modified src/OFInflateStream.h
from [d858471aa3]
to [e064c26fb9].
︙ | | |
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
|
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
|
-
+
-
+
|
*
* @param stream The underlying stream to which compressed data is written or
* from which compressed data is read
* @return A new, autoreleased OFInflateStream
*/
+ (instancetype)streamWithStream: (OFStream *)stream;
- init OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
/*!
* @brief Initializes an already allocated OFInflateStream with the specified
* underlying stream.
*
* @param stream The underlying stream to which compressed data is written or
* from which compressed data is read
* @return A initialized OFInflateStream
*/
- initWithStream: (OFStream *)stream OF_DESIGNATED_INITIALIZER;
- (instancetype)initWithStream: (OFStream *)stream OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|
Modified src/OFInflateStream.m
from [fc22c7448d]
to [360414f679].
︙ | | |
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
|
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
|
-
+
-
+
|
#ifndef INFLATE64
+ (instancetype)streamWithStream: (OFStream *)stream
{
return [[[self alloc] initWithStream: stream] autorelease];
}
- init
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
- initWithStream: (OFStream *)stream
- (instancetype)initWithStream: (OFStream *)stream
{
self = [super init];
_stream = [stream retain];
/* 0-7 address the bit, 8 means fetch next byte */
_bitIndex = 8;
|
︙ | | |
Modified src/OFIntrospection.h
from [69d1f3e9bd]
to [5b3e73bb9a].
︙ | | |
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
-
+
|
@property (readonly, nonatomic) OFString *name;
/*!
* The type encoding for the method.
*/
@property OF_NULLABLE_PROPERTY (readonly, nonatomic) const char *typeEncoding;
- init OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
@end
/*!
* @class OFProperty OFIntrospection.h ObjFW/OFIntrospection.h
*
* @brief A class for describing a property.
*/
|
︙ | | |
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
|
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
|
-
+
|
@property OF_NULLABLE_PROPERTY (readonly, nonatomic) OFString *getter;
/*!
* @return The name of the setter.
*/
@property OF_NULLABLE_PROPERTY (readonly, nonatomic) OFString *setter;
- init OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
@end
/*!
* @class OFInstanceVariable OFIntrospection.h ObjFW/OFIntrospection.h
*
* @brief A class for describing an instance variable.
*/
|
︙ | | |
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
|
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
|
-
+
|
@property (readonly, nonatomic) ptrdiff_t offset;
/*!
* The type encoding for the instance variable.
*/
@property OF_NULLABLE_PROPERTY (readonly, nonatomic) const char *typeEncoding;
- init OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
@end
/*!
* @class OFIntrospection OFIntrospection.h ObjFW/OFIntrospection.h
*
* @brief A class for introspecting classes.
*/
|
︙ | | |
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
|
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
|
-
+
-
+
|
/*!
* @brief Creates a new introspection for the specified class.
*
* @return A new, autoreleased introspection for the specified class
*/
+ (instancetype)introspectionWithClass: (Class)class_;
- init OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
/*!
* @brief Initializes an already allocated OFIntrospection with the specified
* class.
*
* @return An initialized OFIntrospection
*/
- initWithClass: (Class)class_ OF_DESIGNATED_INITIALIZER;
- (instancetype)initWithClass: (Class)class_ OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|
Modified src/OFIntrospection.m
from [952618548a]
to [045afb68a1].
︙ | | |
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
-
+
|
#import "OFArray.h"
#import "OFInitializationFailedException.h"
@implementation OFMethod
@synthesize selector = _selector, name = _name, typeEncoding = _typeEncoding;
- init
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
#if defined(OF_OBJFW_RUNTIME)
- (instancetype)of_initWithMethod: (struct objc_method *)method
{
|
︙ | | |
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
|
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
|
-
+
|
}
@end
@implementation OFProperty
@synthesize name = _name, attributes = _attributes;
@synthesize getter = _getter, setter = _setter;
- init
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
#if defined(OF_OBJFW_RUNTIME)
- (instancetype)of_initWithProperty: (struct objc_property *)property
{
|
︙ | | |
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
|
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
|
-
+
|
return hash;
}
@end
@implementation OFInstanceVariable
@synthesize name = _name, offset = _offset, typeEncoding = _typeEncoding;
- init
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
#if defined(OF_OBJFW_RUNTIME)
- (instancetype)of_initWithIvar: (struct objc_ivar *)ivar
{
|
︙ | | |
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
|
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
|
-
+
-
+
|
@synthesize properties = _properties, instanceVariables = _instanceVariables;
+ (instancetype)introspectionWithClass: (Class)class
{
return [[[self alloc] initWithClass: class] autorelease];
}
- init
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
- initWithClass: (Class)class
- (instancetype)initWithClass: (Class)class
{
self = [super init];
@try {
#if defined(OF_OBJFW_RUNTIME)
struct objc_method_list *methodList;
struct objc_property_list *propertyList;
|
︙ | | |
Modified src/OFInvocation.h
from [123d15423c]
to [045df89640].
︙ | | |
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
-
+
|
/*!
* @brief Initializes an already allocated invocation with the specified method
* signature.
*
* @param signature The method signature for the invocation
* @return An initialized OFInvocation
*/
- initWithMethodSignature: (OFMethodSignature *)signature;
- (instancetype)initWithMethodSignature: (OFMethodSignature *)signature;
/*!
* @brief Sets the argument for the specified index.
*
* @param buffer The buffer in which the argument is stored
* @param index The index of the argument to set
*/
|
︙ | | |
Modified src/OFInvocation.m
from [a554855707]
to [de7b955371].
︙ | | |
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
-
+
|
@synthesize methodSignature = _methodSignature;
+ (instancetype)invocationWithMethodSignature: (OFMethodSignature *)signature
{
return [[[self alloc] initWithMethodSignature: signature] autorelease];
}
- initWithMethodSignature: (OFMethodSignature *)signature
- (instancetype)initWithMethodSignature: (OFMethodSignature *)signature
{
self = [super init];
@try {
void *pool = objc_autoreleasePoolPush();
size_t numberOfArguments = [signature numberOfArguments];
const char *typeEncoding;
|
︙ | | |
Modified src/OFKernelEventObserver.m
from [c21bd55fb9]
to [10e66eceba].
︙ | | |
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
|
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
|
-
+
-
+
|
}
+ (instancetype)observer
{
return [[[self alloc] init] autorelease];
}
+ alloc
+ (instancetype)alloc
{
if (self == [OFKernelEventObserver class])
#if defined(HAVE_KQUEUE)
return [OFKernelEventObserver_kqueue alloc];
#elif defined(HAVE_EPOLL)
return [OFKernelEventObserver_epoll alloc];
#elif defined(HAVE_POLL)
return [OFKernelEventObserver_poll alloc];
#elif defined(HAVE_SELECT)
return [OFKernelEventObserver_select alloc];
#else
# error No kqueue / epoll / poll / select found!
#endif
return [super alloc];
}
- init
- (instancetype)init
{
self = [super init];
@try {
#if !defined(OF_HAVE_PIPE) && !defined(OF_WII) && !defined(OF_NINTENDO_3DS)
socklen_t cancelAddrLen;
#endif
|
︙ | | |
Modified src/OFKernelEventObserver_epoll.m
from [72b75e858f]
to [8df1c9cf76].
︙ | | |
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
-
+
|
#import "OFObserveFailedException.h"
#define EVENTLIST_SIZE 64
static const of_map_table_functions_t mapFunctions = { NULL };
@implementation OFKernelEventObserver_epoll
- init
- (instancetype)init
{
self = [super init];
@try {
struct epoll_event event;
#ifdef HAVE_EPOLL_CREATE1
|
︙ | | |
Modified src/OFKernelEventObserver_kqueue.m
from [f3719ede63]
to [a4cb76e207].
︙ | | |
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
-
+
|
#import "OFInitializationFailedException.h"
#import "OFObserveFailedException.h"
#import "OFOutOfRangeException.h"
#define EVENTLIST_SIZE 64
@implementation OFKernelEventObserver_kqueue
- init
- (instancetype)init
{
self = [super init];
@try {
struct kevent event;
#ifdef HAVE_KQUEUE1
|
︙ | | |
Modified src/OFKernelEventObserver_poll.m
from [5ae2fd3232]
to [5cc8f8bde7].
︙ | | |
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
-
+
|
#ifdef OF_WII
# define pollfd pollsd
# define fd socket
#endif
@implementation OFKernelEventObserver_poll
- init
- (instancetype)init
{
self = [super init];
@try {
struct pollfd p = { _cancelFD[0], POLLIN, 0 };
_FDs = [[OFMutableData alloc] initWithItemSize:
|
︙ | | |
Modified src/OFKernelEventObserver_select.m
from [ab8bd97091]
to [e0ca96b99e].
︙ | | |
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
-
+
|
#import "OFInitializationFailedException.h"
#import "OFObserveFailedException.h"
#import "OFOutOfRangeException.h"
#import "socket_helpers.h"
@implementation OFKernelEventObserver_select
- init
- (instancetype)init
{
self = [super init];
#ifndef OF_WINDOWS
if (_cancelFD[0] >= (int)FD_SETSIZE)
@throw [OFInitializationFailedException
exceptionWithClass: [self class]];
|
︙ | | |
Modified src/OFList.h
from [2bcd2e7a45]
to [9a9431e042].
︙ | | |
186
187
188
189
190
191
192
193
194
195
196
197
|
186
187
188
189
190
191
192
193
194
195
196
197
|
-
-
+
+
|
{
OFList *_list;
of_list_object_t *_Nullable _current;
unsigned long _mutations;
unsigned long *_Nullable _mutationsPtr;
}
- initWithList: (OFList *)list
mutationsPointer: (unsigned long *)mutationsPtr;
- (instancetype)initWithList: (OFList *)list
mutationsPointer: (unsigned long *)mutationsPtr;
@end
OF_ASSUME_NONNULL_END
|
Modified src/OFList.m
from [e2872c89cd]
to [8973979249].
︙ | | |
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
-
+
|
@synthesize lastListObject = _lastListObject;
+ (instancetype)list
{
return [[[self alloc] init] autorelease];
}
- initWithSerialization: (OFXMLElement *)element
- (instancetype)initWithSerialization: (OFXMLElement *)element
{
self = [self init];
@try {
void *pool = objc_autoreleasePoolPush();
if (![[element name] isEqual: [self className]] ||
|
︙ | | |
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
|
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
|
-
+
|
[iter->object release];
[self freeMemory: iter];
}
_firstListObject = _lastListObject = NULL;
}
- copy
- (id)copy
{
OFList *copy = [[[self class] alloc] init];
of_list_object_t *listObject, *previous;
listObject = NULL;
previous = NULL;
|
︙ | | |
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
|
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
|
-
-
+
+
|
return [[[OFListEnumerator alloc]
initWithList: self
mutationsPointer: &_mutations] autorelease];
}
@end
@implementation OFListEnumerator
- initWithList: (OFList *)list
mutationsPointer: (unsigned long *)mutationsPtr
- (instancetype)initWithList: (OFList *)list
mutationsPointer: (unsigned long *)mutationsPtr
{
self = [super init];
_list = [list retain];
_current = [list firstListObject];
_mutations = *mutationsPtr;
_mutationsPtr = mutationsPtr;
|
︙ | | |
Modified src/OFLocalization.h
from [03379b10b1]
to [d21618db7e].
︙ | | |
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
|
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
|
-
+
|
* @warning This sets the locale via `setlocale()`!
*
* @warning You should never call this yourself, except if you do not use
* @ref OFApplication. In this case, you need to allocate exactly one
* instance of OFLocalization, which will be come the singleton, and
* call this method.
*/
- init;
- (instancetype)init;
#ifdef OF_HAVE_FILES
/*!
* @brief Adds a directory to scan for language files.
*
* @param path The path to the directory to scan for language files
*/
|
︙ | | |
Modified src/OFLocalization.m
from [1e6c9574a4]
to [e4a754b9ab].
︙ | | |
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
|
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
|
-
+
|
#ifdef OF_HAVE_FILES
+ (void)addLanguageDirectory: (OFString *)path
{
[sharedLocalization addLanguageDirectory: path];
}
#endif
- init
- (instancetype)init
{
self = [super init];
@try {
#ifndef OF_MORPHOS
char *locale, *messagesLocale = NULL;
|
︙ | | |
Modified src/OFMD5Hash.m
from [5fa8ef5288]
to [2136f8a2ba].
︙ | | |
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
|
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
|
-
+
-
+
|
}
+ (instancetype)cryptoHash
{
return [[[self alloc] init] autorelease];
}
- init
- (instancetype)init
{
self = [super init];
[self of_resetState];
return self;
}
- (void)dealloc
{
[self reset];
[super dealloc];
}
- copy
- (id)copy
{
OFMD5Hash *copy = [[OFMD5Hash alloc] init];
memcpy(copy->_state, _state, sizeof(_state));
copy->_bits = _bits;
memcpy(©->_buffer, &_buffer, sizeof(_buffer));
copy->_bufferLength = _bufferLength;
|
︙ | | |
Modified src/OFMapTable+Private.h
from [4526b06ac3]
to [2f8c365706].
︙ | | |
20
21
22
23
24
25
26
27
28
29
30
31
|
20
21
22
23
24
25
26
27
28
29
30
31
|
-
-
+
+
|
@interface OFMapTable_EnumeratorWrapper: OFEnumerator
{
OFMapTableEnumerator *_enumerator;
id _object;
}
- initWithEnumerator: (OFMapTableEnumerator *)enumerator
object: (id)object;
- (instancetype)initWithEnumerator: (OFMapTableEnumerator *)enumerator
object: (id)object;
@end
OF_ASSUME_NONNULL_END
|
Modified src/OFMapTable.h
from [975babca81]
to [df99b8af7c].
︙ | | |
110
111
112
113
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
|
110
111
112
113
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
|
-
+
-
-
+
+
-
-
-
+
+
+
+
|
* @return A new autoreleased OFMapTable
*/
+ (instancetype)mapTableWithKeyFunctions: (of_map_table_functions_t)keyFunctions
objectFunctions: (of_map_table_functions_t)
objectFunctions
capacity: (size_t)capacity;
- init OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
/*!
* @brief Initializes an already allocated OFMapTable with the specified key
* and object functions.
*
* @param keyFunctions A structure of functions for handling keys
* @param objectFunctions A structure of functions for handling objects
* @return An initialized OFMapTable
*/
- initWithKeyFunctions: (of_map_table_functions_t)keyFunctions
objectFunctions: (of_map_table_functions_t)objectFunctions;
- (instancetype)initWithKeyFunctions: (of_map_table_functions_t)keyFunctions
objectFunctions: (of_map_table_functions_t)objectFunctions;
/*!
* @brief Initializes an already allocated OFMapTable with the specified key
* functions, object functions and capacity.
*
* @param keyFunctions A structure of functions for handling keys
* @param objectFunctions A structure of functions for handling objects
* @param capacity A hint about the count of elements expected to be in the map
* table
* @return An initialized OFMapTable
*/
- initWithKeyFunctions: (of_map_table_functions_t)keyFunctions
objectFunctions: (of_map_table_functions_t)objectFunctions
capacity: (size_t)capacity OF_DESIGNATED_INITIALIZER;
- (instancetype)initWithKeyFunctions: (of_map_table_functions_t)keyFunctions
objectFunctions: (of_map_table_functions_t)objectFunctions
capacity: (size_t)capacity
OF_DESIGNATED_INITIALIZER;
/*!
* @brief Returns the number of objects in the map table.
*
* @return The number of objects in the map table
*/
- (size_t)count;
|
︙ | | |
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
|
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
|
-
+
|
struct of_map_table_bucket *_Nonnull *_Nullable _buckets;
uint32_t _capacity;
unsigned long _mutations;
unsigned long *_Nullable _mutationsPtr;
uint32_t _position;
}
- init OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
/*!
* @brief Returns a pointer to the next object, or NULL if the enumeration
* finished.
*
* @return The next object
*/
|
︙ | | |
Modified src/OFMapTable.m
from [2c59c12f0d]
to [18b269539e].
︙ | | |
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
|
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
|
-
+
-
-
+
+
-
-
-
+
+
+
|
{
return [[[self alloc]
initWithKeyFunctions: keyFunctions
objectFunctions: objectFunctions
capacity: capacity] autorelease];
}
- init
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
- initWithKeyFunctions: (of_map_table_functions_t)keyFunctions
objectFunctions: (of_map_table_functions_t)objectFunctions
- (instancetype)initWithKeyFunctions: (of_map_table_functions_t)keyFunctions
objectFunctions: (of_map_table_functions_t)objectFunctions
{
return [self initWithKeyFunctions: keyFunctions
objectFunctions: objectFunctions
capacity: 0];
}
- initWithKeyFunctions: (of_map_table_functions_t)keyFunctions
objectFunctions: (of_map_table_functions_t)objectFunctions
capacity: (size_t)capacity
- (instancetype)initWithKeyFunctions: (of_map_table_functions_t)keyFunctions
objectFunctions: (of_map_table_functions_t)objectFunctions
capacity: (size_t)capacity
{
self = [super init];
@try {
_keyFunctions = keyFunctions;
_objectFunctions = objectFunctions;
|
︙ | | |
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
|
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
|
-
+
|
hash += _objectFunctions.hash(_buckets[i]->object);
}
}
return hash;
}
- copy
- (id)copy
{
OFMapTable *copy = [[OFMapTable alloc]
initWithKeyFunctions: _keyFunctions
objectFunctions: _objectFunctions
capacity: _capacity];
@try {
|
︙ | | |
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
|
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
|
-
+
|
}
}
}
#endif
@end
@implementation OFMapTableEnumerator
- init
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
- (instancetype)of_initWithMapTable: (OFMapTable *)mapTable
buckets: (struct of_map_table_bucket **)buckets
capacity: (uint32_t)capacity
|
︙ | | |
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
|
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
|
-
-
+
+
|
return &_buckets[_position++]->object;
else
return NULL;
}
@end
@implementation OFMapTable_EnumeratorWrapper
- initWithEnumerator: (OFMapTableEnumerator *)enumerator
object: (id)object
- (instancetype)initWithEnumerator: (OFMapTableEnumerator *)enumerator
object: (id)object
{
self = [super init];
_enumerator = [enumerator retain];
_object = [object retain];
return self;
|
︙ | | |
Modified src/OFMessagePackExtension.h
from [8e4fd57b89]
to [c032ad54fa].
︙ | | |
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
-
+
-
-
+
+
|
* @param type The MessagePack extension type
* @param data The data for the extension
* @return A new, autoreleased OFMessagePackRepresentation
*/
+ (instancetype)extensionWithType: (int8_t)type
data: (OFData *)data;
- init OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
/*!
* @brief Initializes an already allocated OFMessagePackRepresentation with the
* specified type and data.
*
* @param type The MessagePack extension type
* @param data The data for the extension
* @return An initialized OFMessagePackRepresentation
*/
- initWithType: (int8_t)type
data: (OFData *)data OF_DESIGNATED_INITIALIZER;
- (instancetype)initWithType: (int8_t)type
data: (OFData *)data OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|
Modified src/OFMessagePackExtension.m
from [2b45f06590]
to [67186a8de4].
︙ | | |
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
-
+
-
-
+
+
|
+ (instancetype)extensionWithType: (int8_t)type
data: (OFData *)data
{
return [[[self alloc] initWithType: type
data: data] autorelease];
}
- init
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
- initWithType: (int8_t)type
data: (OFData *)data
- (instancetype)initWithType: (int8_t)type
data: (OFData *)data
{
self = [super init];
@try {
if (data == nil || [data itemSize] != 1)
@throw [OFInvalidArgumentException exception];
|
︙ | | |
183
184
185
186
187
188
189
190
191
192
193
194
|
183
184
185
186
187
188
189
190
191
192
193
194
|
-
+
|
OF_HASH_ADD_HASH(hash, [_data hash]);
OF_HASH_FINALIZE(hash);
return hash;
}
- copy
- (id)copy
{
return [self retain];
}
@end
|
Modified src/OFMethodSignature.h
from [c54083e3fd]
to [4e07660cca].
︙ | | |
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
-
+
|
/*!
* @brief Initializes an already allocated OFMethodSignature with the specified
* ObjC types.
*
* @param types The ObjC types of the method
* @return An Initialized OFMethodSignature
*/
- initWithObjCTypes: (const char *)types;
- (instancetype)initWithObjCTypes: (const char *)types;
/*!
* @brief Returns the ObjC type for the argument at the specified index.
*
* @param index The index of the argument for which to return the ObjC type
* @return The ObjC type for the argument at the specified index
*/
|
︙ | | |
Modified src/OFMethodSignature.m
from [459569951b]
to [8c5f408f1b].
︙ | | |
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
|
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
|
-
+
|
@implementation OFMethodSignature
+ (instancetype)signatureWithObjCTypes: (const char*)types
{
return [[[self alloc] initWithObjCTypes: types] autorelease];
}
- initWithObjCTypes: (const char *)types
- (instancetype)initWithObjCTypes: (const char *)types
{
self = [super init];
@try {
size_t length;
const char *last;
|
︙ | | |
Modified src/OFMutableArray.h
from [8b66863b27]
to [9bb82b7b0e].
︙ | | |
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
|
-
+
|
/*!
* @brief Initializes an already allocated OFMutableArray with enough memory to
* hold the specified number of objects.
*
* @param capacity The initial capacity for the OFMutableArray
* @return An initialized OFMutableArray
*/
- initWithCapacity: (size_t)capacity;
- (instancetype)initWithCapacity: (size_t)capacity;
/*!
* @brief Adds an object to the end of the array.
*
* @param object An object to add
*/
- (void)addObject: (ObjectType)object;
|
︙ | | |
Modified src/OFMutableArray.m
from [706da4f76f]
to [d9547cea8c].
︙ | | |
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
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
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
204
205
206
|
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
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
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
204
205
206
|
-
+
-
+
-
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
+
-
+
|
left = i + 1;
}
}
#endif
@implementation OFMutableArray_placeholder
- init
- (instancetype)init
{
return (id)[[OFMutableArray_adjacent alloc] init];
}
- initWithCapacity: (size_t)capacity
- (instancetype)initWithCapacity: (size_t)capacity
{
return (id)[[OFMutableArray_adjacent alloc] initWithCapacity: capacity];
}
- initWithObject: (id)object
- (instancetype)initWithObject: (id)object
{
return (id)[[OFMutableArray_adjacent alloc] initWithObject: object];
}
- initWithObjects: (id)firstObject, ...
- (instancetype)initWithObjects: (id)firstObject, ...
{
id ret;
va_list arguments;
va_start(arguments, firstObject);
ret = [[OFMutableArray_adjacent alloc] initWithObject: firstObject
arguments: arguments];
va_end(arguments);
return ret;
}
- initWithObject: (id)firstObject
arguments: (va_list)arguments
- (instancetype)initWithObject: (id)firstObject
arguments: (va_list)arguments
{
return (id)[[OFMutableArray_adjacent alloc] initWithObject: firstObject
arguments: arguments];
}
- initWithArray: (OFArray *)array
- (instancetype)initWithArray: (OFArray *)array
{
return (id)[[OFMutableArray_adjacent alloc] initWithArray: array];
}
- initWithObjects: (id const *)objects
count: (size_t)count
- (instancetype)initWithObjects: (id const *)objects
count: (size_t)count
{
return (id)[[OFMutableArray_adjacent alloc] initWithObjects: objects
count: count];
}
- initWithSerialization: (OFXMLElement *)element
- (instancetype)initWithSerialization: (OFXMLElement *)element
{
return (id)[[OFMutableArray_adjacent alloc]
initWithSerialization: element];
}
- retain
- (instancetype)retain
{
return self;
}
- autorelease
- (instancetype)autorelease
{
return self;
}
- (void)release
{
}
|
︙ | | |
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
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
258
259
260
261
|
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
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
258
259
260
261
|
-
+
-
+
-
+
-
+
|
@implementation OFMutableArray
+ (void)initialize
{
if (self == [OFMutableArray class])
placeholder.isa = [OFMutableArray_placeholder class];
}
+ alloc
+ (instancetype)alloc
{
if (self == [OFMutableArray class])
return (id)&placeholder;
return [super alloc];
}
+ (instancetype)arrayWithCapacity: (size_t)capacity
{
return [[[self alloc] initWithCapacity: capacity] autorelease];
}
- init
- (instancetype)init
{
if (object_getClass(self) == [OFMutableArray class]) {
@try {
[self doesNotRecognizeSelector: _cmd];
abort();
} @catch (id e) {
[self release];
@throw e;
}
}
return [super init];
}
- initWithCapacity: (size_t)capacity
- (instancetype)initWithCapacity: (size_t)capacity
{
OF_INVALID_INIT_METHOD
}
- copy
- (id)copy
{
return [[OFArray alloc] initWithArray: self];
}
- (void)addObject: (id)object
{
[self insertObject: object
|
︙ | | |
Modified src/OFMutableArray_adjacent.m
from [72511012c6]
to [5cf73c1314].
︙ | | |
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
-
+
|
@implementation OFMutableArray_adjacent
+ (void)initialize
{
if (self == [OFMutableArray_adjacent class])
[self inheritMethodsFromClass: [OFArray_adjacent class]];
}
- initWithCapacity: (size_t)capacity
- (instancetype)initWithCapacity: (size_t)capacity
{
self = [super init];
@try {
_array = [[OFMutableData alloc] initWithItemSize: sizeof(id)
capacity: capacity];
} @catch (id e) {
|
︙ | | |
Modified src/OFMutableData.h
from [0dca48a207]
to [f022240c55].
︙ | | |
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
|
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
|
-
+
-
+
-
+
-
-
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
|
freeWhenDone: (bool)freeWhenDone OF_UNAVAILABLE;
/*!
* @brief Initializes an already allocated OFMutableData with an item size of 1.
*
* @return An initialized OFMutableData
*/
- init;
- (instancetype)init;
/*!
* @brief Initializes an already allocated OFMutableData whose items all have
* the same size.
*
* @param itemSize The size of a single element in the OFMutableData
* @return An initialized OFMutableData
*/
- initWithItemSize: (size_t)itemSize;
- (instancetype)initWithItemSize: (size_t)itemSize;
/*!
* @brief Initializes an already allocated OFMutableData with enough memory to
* hold the the specified number of items which all have an item size of
* 1.
*
* @param capacity The initial capacity for the OFMutableData
* @return An initialized OFMutableData
*/
- initWithCapacity: (size_t)capacity;
- (instancetype)initWithCapacity: (size_t)capacity;
/*!
* @brief Initializes an already allocated OFMutableData with enough memory to
* hold the the specified number of items which all have the same
* specified size.
*
* @param itemSize The size of a single element in the OFMutableData
* @param capacity The initial capacity for the OFMutableData
* @return An initialized OFMutableData
*/
- initWithItemSize: (size_t)itemSize
capacity: (size_t)capacity;
- (instancetype)initWithItemSize: (size_t)itemSize
capacity: (size_t)capacity;
- initWithItemsNoCopy: (const void *)items
count: (size_t)count
freeWhenDone: (bool)freeWhenDone OF_UNAVAILABLE;
- initWithItemsNoCopy: (const void *)items
itemSize: (size_t)itemSize
count: (size_t)count
freeWhenDone: (bool)freeWhenDone OF_UNAVAILABLE;
- (instancetype)initWithItemsNoCopy: (const void *)items
count: (size_t)count
freeWhenDone: (bool)freeWhenDone OF_UNAVAILABLE;
- (instancetype)initWithItemsNoCopy: (const void *)items
itemSize: (size_t)itemSize
count: (size_t)count
freeWhenDone: (bool)freeWhenDone OF_UNAVAILABLE;
/*!
* @brief Adds an item to the OFMutableData.
*
* @param item A pointer to an arbitrary item
*/
- (void)addItem: (const void *)item;
|
︙ | | |
Modified src/OFMutableData.m
from [511512b3be]
to [1ec47eeb35].
︙ | | |
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
|
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
|
-
+
-
+
-
+
-
-
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
-
+
+
+
+
-
+
|
itemSize: (size_t)itemSize
count: (size_t)count
freeWhenDone: (bool)freeWhenDone
{
OF_UNRECOGNIZED_SELECTOR
}
- init
- (instancetype)init
{
self = [super of_init];
_itemSize = 1;
return self;
}
- initWithItemSize: (size_t)itemSize
- (instancetype)initWithItemSize: (size_t)itemSize
{
self = [super of_init];
@try {
if (itemSize == 0)
@throw [OFInvalidArgumentException exception];
_itemSize = itemSize;
} @catch (id e) {
[self release];
@throw e;
}
return self;
}
- initWithCapacity: (size_t)capacity
- (instancetype)initWithCapacity: (size_t)capacity
{
return [self initWithItemSize: 1
capacity: capacity];
}
- initWithItemSize: (size_t)itemSize
capacity: (size_t)capacity
- (instancetype)initWithItemSize: (size_t)itemSize
capacity: (size_t)capacity
{
self = [super of_init];
@try {
if (itemSize == 0)
@throw [OFInvalidArgumentException exception];
_items = [self allocMemoryWithSize: itemSize
count: capacity];
_itemSize = itemSize;
_capacity = capacity;
} @catch (id e) {
[self release];
@throw e;
}
return self;
}
- initWithItems: (const void *)items
itemSize: (size_t)itemSize
count: (size_t)count
- (instancetype)initWithItems: (const void *)items
itemSize: (size_t)itemSize
count: (size_t)count
{
self = [super initWithItems: items
itemSize: itemSize
count: count];
_capacity = _count;
return self;
}
- initWithItemsNoCopy: (const void *)items
count: (size_t)count
freeWhenDone: (bool)freeWhenDone
- (instancetype)initWithItemsNoCopy: (const void *)items
count: (size_t)count
freeWhenDone: (bool)freeWhenDone
{
OF_INVALID_INIT_METHOD
}
- initWithItemsNoCopy: (const void *)items
itemSize: (size_t)itemSize
count: (size_t)count
freeWhenDone: (bool)freeWhenDone
- (instancetype)initWithItemsNoCopy: (const void *)items
itemSize: (size_t)itemSize
count: (size_t)count
freeWhenDone: (bool)freeWhenDone
{
OF_INVALID_INIT_METHOD
}
- initWithStringRepresentation: (OFString *)string
- (instancetype)initWithStringRepresentation: (OFString *)string
{
self = [super initWithStringRepresentation: string];
_capacity = _count;
return self;
}
|
︙ | | |
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
|
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
|
-
+
|
[self freeMemory: _items];
_items = NULL;
_count = 0;
_capacity = 0;
}
- copy
- (id)copy
{
return [[OFData alloc] initWithItems: _items
itemSize: _itemSize
count: _count];
}
- (void)makeImmutable
{
object_setClass(self, [OFData class]);
}
@end
|
Modified src/OFMutableDictionary.h
from [6a5236f2f3]
to [432341193d].
︙ | | |
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
-
+
|
/*!
* @brief Initializes an already allocated OFMutableDictionary with enough
* memory to hold the specified number of objects.
*
* @param capacity The initial capacity for the OFMutableDictionary
* @return An initialized OFMutableDictionary
*/
- initWithCapacity: (size_t)capacity;
- (instancetype)initWithCapacity: (size_t)capacity;
/*!
* @brief Sets an object for a key.
*
* A key can be any object that conforms to the OFCopying protocol.
*
* @param key The key to set
|
︙ | | |
Modified src/OFMutableDictionary.m
from [d718ec6322]
to [04d26872af].
︙ | | |
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
|
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
|
-
+
-
+
-
-
+
+
-
-
+
+
-
-
-
+
+
+
-
+
-
-
+
+
-
+
-
+
-
+
-
+
|
Class isa;
} placeholder;
@interface OFMutableDictionary_placeholder: OFDictionary
@end
@implementation OFMutableDictionary_placeholder
- init
- (instancetype)init
{
return (id)[[OFMutableDictionary_hashtable alloc] init];
}
- initWithDictionary: (OFDictionary *)dictionary
- (instancetype)initWithDictionary: (OFDictionary *)dictionary
{
return (id)[[OFMutableDictionary_hashtable alloc]
initWithDictionary: dictionary];
}
- initWithObject: (id)object
forKey: (id)key
- (instancetype)initWithObject: (id)object
forKey: (id)key
{
return (id)[[OFMutableDictionary_hashtable alloc] initWithObject: object
forKey: key];
}
- initWithObjects: (OFArray *)objects
forKeys: (OFArray *)keys
- (instancetype)initWithObjects: (OFArray *)objects
forKeys: (OFArray *)keys
{
return (id)[[OFMutableDictionary_hashtable alloc]
initWithObjects: objects
forKeys: keys];
}
- initWithObjects: (id const *)objects
forKeys: (id const *)keys
count: (size_t)count
- (instancetype)initWithObjects: (id const *)objects
forKeys: (id const *)keys
count: (size_t)count
{
return (id)[[OFMutableDictionary_hashtable alloc]
initWithObjects: objects
forKeys: keys
count: count];
}
- initWithKeysAndObjects: (id)firstKey, ...
- (instancetype)initWithKeysAndObjects: (id)firstKey, ...
{
id ret;
va_list arguments;
va_start(arguments, firstKey);
ret = (id)[[OFMutableDictionary_hashtable alloc]
initWithKey: firstKey
arguments: arguments];
va_end(arguments);
return ret;
}
- initWithKey: (id)firstKey
arguments: (va_list)arguments
- (instancetype)initWithKey: (id)firstKey
arguments: (va_list)arguments
{
return (id)[[OFMutableDictionary_hashtable alloc]
initWithKey: firstKey
arguments: arguments];
}
- initWithSerialization: (OFXMLElement *)element
- (instancetype)initWithSerialization: (OFXMLElement *)element
{
return (id)[[OFMutableDictionary_hashtable alloc]
initWithSerialization: element];
}
- initWithCapacity: (size_t)capacity
- (instancetype)initWithCapacity: (size_t)capacity
{
return (id)[[OFMutableDictionary_hashtable alloc]
initWithCapacity: capacity];
}
- retain
- (instancetype)retain
{
return self;
}
- autorelease
- (instancetype)autorelease
{
return self;
}
- (void)release
{
}
|
︙ | | |
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
154
155
156
157
158
159
160
161
162
163
164
165
166
|
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
154
155
156
157
158
159
160
161
162
163
164
165
166
|
-
+
-
+
-
+
|
@implementation OFMutableDictionary
+ (void)initialize
{
if (self == [OFMutableDictionary class])
placeholder.isa = [OFMutableDictionary_placeholder class];
}
+ alloc
+ (instancetype)alloc
{
if (self == [OFMutableDictionary class])
return (id)&placeholder;
return [super alloc];
}
+ (instancetype)dictionaryWithCapacity: (size_t)capacity
{
return [[[self alloc] initWithCapacity: capacity] autorelease];
}
- init
- (instancetype)init
{
if (object_getClass(self) == [OFMutableDictionary class]) {
@try {
[self doesNotRecognizeSelector: _cmd];
} @catch (id e) {
[self release];
@throw e;
}
abort();
}
return [super init];
}
- initWithCapacity: (size_t)capacity
- (instancetype)initWithCapacity: (size_t)capacity
{
OF_INVALID_INIT_METHOD
}
- (void)setObject: (id)object
forKey: (id)key
{
|
︙ | | |
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
|
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
|
-
+
|
for (id key in [self allKeys])
[self removeObjectForKey: key];
objc_autoreleasePoolPop(pool);
}
- copy
- (id)copy
{
return [[OFDictionary alloc] initWithDictionary: self];
}
- (void)addEntriesFromDictionary: (OFDictionary *)dictionary
{
void *pool = objc_autoreleasePoolPush();
|
︙ | | |
Modified src/OFMutablePair.m
from [fd16e0b90e]
to [ce5e567f88].
︙ | | |
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
-
+
|
- (void)setSecondObject: (id)secondObject
{
id old = _secondObject;
_secondObject = [secondObject retain];
[old release];
}
- copy
- (id)copy
{
OFMutablePair *copy = [self mutableCopy];
[copy makeImmutable];
return copy;
}
- (void)makeImmutable
{
object_setClass(self, [OFPair class]);
}
@end
|
Modified src/OFMutableSet.h
from [e31e233b6e]
to [46407560c3].
︙ | | |
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
-
+
|
/*!
* @brief Initializes an already allocated OFMutableSet with enough memory to
* hold the specified number of objects.
*
* @param capacity The initial capacity for the OFMutableSet
* @return An initialized OFMutableSet
*/
- initWithCapacity: (size_t)capacity;
- (instancetype)initWithCapacity: (size_t)capacity;
/*!
* @brief Adds the specified object to the set.
*
* @param object The object to add to the set
*/
- (void)addObject: (ObjectType)object;
|
︙ | | |
Modified src/OFMutableSet.m
from [c759b99c57]
to [1df07a3c74].
︙ | | |
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
|
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
|
-
+
-
+
-
+
-
+
-
-
+
+
-
-
+
+
-
+
-
+
-
+
-
+
|
Class isa;
} placeholder;
@interface OFMutableSet_placeholder: OFMutableSet
@end
@implementation OFMutableSet_placeholder
- init
- (instancetype)init
{
return (id)[[OFMutableSet_hashtable alloc] init];
}
- initWithSet: (OFSet *)set
- (instancetype)initWithSet: (OFSet *)set
{
return (id)[[OFMutableSet_hashtable alloc] initWithSet: set];
}
- initWithArray: (OFArray *)array
- (instancetype)initWithArray: (OFArray *)array
{
return (id)[[OFMutableSet_hashtable alloc] initWithArray: array];
}
- initWithObjects: (id)firstObject, ...
- (instancetype)initWithObjects: (id)firstObject, ...
{
id ret;
va_list arguments;
va_start(arguments, firstObject);
ret = [[OFMutableSet_hashtable alloc] initWithObject: firstObject
arguments: arguments];
va_end(arguments);
return ret;
}
- initWithObjects: (id const *)objects
count: (size_t)count
- (instancetype)initWithObjects: (id const *)objects
count: (size_t)count
{
return (id)[[OFMutableSet_hashtable alloc] initWithObjects: objects
count: count];
}
- initWithObject: (id)firstObject
arguments: (va_list)arguments
- (instancetype)initWithObject: (id)firstObject
arguments: (va_list)arguments
{
return (id)[[OFMutableSet_hashtable alloc] initWithObject: firstObject
arguments: arguments];
}
- initWithSerialization: (OFXMLElement *)element
- (instancetype)initWithSerialization: (OFXMLElement *)element
{
return (id)[[OFMutableSet_hashtable alloc]
initWithSerialization: element];
}
- initWithCapacity: (size_t)capacity
- (instancetype)initWithCapacity: (size_t)capacity
{
return (id)[[OFMutableSet_hashtable alloc] initWithCapacity: capacity];
}
- retain
- (instancetype)retain
{
return self;
}
- autorelease
- (instancetype)autorelease
{
return self;
}
- (void)release
{
}
|
︙ | | |
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
|
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
|
-
+
-
+
-
+
|
@implementation OFMutableSet
+ (void)initialize
{
if (self == [OFMutableSet class])
placeholder.isa = [OFMutableSet_placeholder class];
}
+ alloc
+ (instancetype)alloc
{
if (self == [OFMutableSet class])
return (id)&placeholder;
return [super alloc];
}
+ (instancetype)setWithCapacity: (size_t)capacity
{
return [[[self alloc] initWithCapacity: capacity] autorelease];
}
- init
- (instancetype)init
{
if (object_getClass(self) == [OFMutableSet class]) {
@try {
[self doesNotRecognizeSelector: _cmd];
abort();
} @catch (id e) {
[self release];
@throw e;
}
}
return [super init];
}
- initWithCapacity: (size_t)capacity
- (instancetype)initWithCapacity: (size_t)capacity
{
OF_INVALID_INIT_METHOD
}
- (void)addObject: (id)object
{
OF_UNRECOGNIZED_SELECTOR
|
︙ | | |
Modified src/OFMutableString.m
from [7b8005c3d9]
to [8288a048e9].
︙ | | |
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
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
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
204
205
206
207
208
209
210
211
212
213
214
215
216
217
|
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
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
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
204
205
206
207
208
209
210
211
212
213
214
215
216
217
|
-
+
-
+
-
-
+
+
-
-
+
+
-
-
-
+
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
-
+
+
-
-
-
+
+
+
-
+
-
-
+
+
-
-
+
+
-
-
-
+
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
+
-
+
|
Class isa;
} placeholder;
@interface OFMutableString_placeholder: OFMutableString
@end
@implementation OFMutableString_placeholder
- init
- (instancetype)init
{
return (id)[[OFMutableString_UTF8 alloc] init];
}
- initWithUTF8String: (const char *)UTF8String
- (instancetype)initWithUTF8String: (const char *)UTF8String
{
return (id)[[OFMutableString_UTF8 alloc]
initWithUTF8String: UTF8String];
}
- initWithUTF8String: (const char *)UTF8String
length: (size_t)UTF8StringLength
- (instancetype)initWithUTF8String: (const char *)UTF8String
length: (size_t)UTF8StringLength
{
return (id)[[OFMutableString_UTF8 alloc]
initWithUTF8String: UTF8String
length: UTF8StringLength];
}
- initWithCString: (const char *)cString
encoding: (of_string_encoding_t)encoding
- (instancetype)initWithCString: (const char *)cString
encoding: (of_string_encoding_t)encoding
{
return (id)[[OFMutableString_UTF8 alloc] initWithCString: cString
encoding: encoding];
}
- initWithCString: (const char *)cString
encoding: (of_string_encoding_t)encoding
length: (size_t)cStringLength
- (instancetype)initWithCString: (const char *)cString
encoding: (of_string_encoding_t)encoding
length: (size_t)cStringLength
{
return (id)[[OFMutableString_UTF8 alloc]
initWithCString: cString
encoding: encoding
length: cStringLength];
}
- initWithString: (OFString *)string
- (instancetype)initWithString: (OFString *)string
{
return (id)[[OFMutableString_UTF8 alloc] initWithString: string];
}
- initWithCharacters: (const of_unichar_t *)characters
length: (size_t)length
- (instancetype)initWithCharacters: (const of_unichar_t *)characters
length: (size_t)length
{
return (id)[[OFMutableString_UTF8 alloc] initWithCharacters: characters
length: length];
}
- initWithUTF16String: (const char16_t *)string
- (instancetype)initWithUTF16String: (const char16_t *)string
{
return (id)[[OFMutableString_UTF8 alloc] initWithUTF16String: string];
}
- initWithUTF16String: (const char16_t *)string
length: (size_t)length
- (instancetype)initWithUTF16String: (const char16_t *)string
length: (size_t)length
{
return (id)[[OFMutableString_UTF8 alloc] initWithUTF16String: string
length: length];
}
- initWithUTF16String: (const char16_t *)string
byteOrder: (of_byte_order_t)byteOrder
- (instancetype)initWithUTF16String: (const char16_t *)string
byteOrder: (of_byte_order_t)byteOrder
{
return (id)[[OFMutableString_UTF8 alloc]
initWithUTF16String: string
byteOrder: byteOrder];
}
- initWithUTF16String: (const char16_t *)string
length: (size_t)length
byteOrder: (of_byte_order_t)byteOrder
- (instancetype)initWithUTF16String: (const char16_t *)string
length: (size_t)length
byteOrder: (of_byte_order_t)byteOrder
{
return (id)[[OFMutableString_UTF8 alloc]
initWithUTF16String: string
length: length
byteOrder: byteOrder];
}
- initWithUTF32String: (const char32_t *)string
- (instancetype)initWithUTF32String: (const char32_t *)string
{
return (id)[[OFMutableString_UTF8 alloc] initWithUTF32String: string];
}
- initWithUTF32String: (const char32_t *)string
length: (size_t)length
- (instancetype)initWithUTF32String: (const char32_t *)string
length: (size_t)length
{
return (id)[[OFMutableString_UTF8 alloc] initWithUTF32String: string
length: length];
}
- initWithUTF32String: (const char32_t *)string
byteOrder: (of_byte_order_t)byteOrder
- (instancetype)initWithUTF32String: (const char32_t *)string
byteOrder: (of_byte_order_t)byteOrder
{
return (id)[[OFMutableString_UTF8 alloc]
initWithUTF32String: string
byteOrder: byteOrder];
}
- initWithUTF32String: (const char32_t *)string
length: (size_t)length
byteOrder: (of_byte_order_t)byteOrder
- (instancetype)initWithUTF32String: (const char32_t *)string
length: (size_t)length
byteOrder: (of_byte_order_t)byteOrder
{
return (id)[[OFMutableString_UTF8 alloc]
initWithUTF32String: string
length: length
byteOrder: byteOrder];
}
- initWithFormat: (OFConstantString *)format, ...
- (instancetype)initWithFormat: (OFConstantString *)format, ...
{
id ret;
va_list arguments;
va_start(arguments, format);
ret = [[OFMutableString_UTF8 alloc] initWithFormat: format
arguments: arguments];
va_end(arguments);
return ret;
}
- initWithFormat: (OFConstantString *)format
arguments: (va_list)arguments
- (instancetype)initWithFormat: (OFConstantString *)format
arguments: (va_list)arguments
{
return (id)[[OFMutableString_UTF8 alloc] initWithFormat: format
arguments: arguments];
}
#ifdef OF_HAVE_FILES
- initWithContentsOfFile: (OFString *)path
- (instancetype)initWithContentsOfFile: (OFString *)path
{
return (id)[[OFMutableString_UTF8 alloc] initWithContentsOfFile: path];
}
- initWithContentsOfFile: (OFString *)path
encoding: (of_string_encoding_t)encoding
- (instancetype)initWithContentsOfFile: (OFString *)path
encoding: (of_string_encoding_t)encoding
{
return (id)[[OFMutableString_UTF8 alloc]
initWithContentsOfFile: path
encoding: encoding];
}
#endif
#if defined(OF_HAVE_FILES) || defined(OF_HAVE_SOCKETS)
- initWithContentsOfURL: (OFURL *)URL
- (instancetype)initWithContentsOfURL: (OFURL *)URL
{
return (id)[[OFMutableString_UTF8 alloc] initWithContentsOfURL: URL];
}
- initWithContentsOfURL: (OFURL *)URL
encoding: (of_string_encoding_t)encoding
- (instancetype)initWithContentsOfURL: (OFURL *)URL
encoding: (of_string_encoding_t)encoding
{
return (id)[[OFMutableString_UTF8 alloc]
initWithContentsOfURL: URL
encoding: encoding];
}
#endif
- initWithSerialization: (OFXMLElement *)element
- (instancetype)initWithSerialization: (OFXMLElement *)element
{
return (id)[[OFMutableString_UTF8 alloc]
initWithSerialization: element];
}
- retain
- (instancetype)retain
{
return self;
}
- autorelease
- (instancetype)autorelease
{
return self;
}
- (void)release
{
}
|
︙ | | |
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
|
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
|
-
+
|
@implementation OFMutableString
+ (void)initialize
{
if (self == [OFMutableString class])
placeholder.isa = [OFMutableString_placeholder class];
}
+ alloc
+ (instancetype)alloc
{
if (self == [OFMutableString class])
return (id)&placeholder;
return [super alloc];
}
|
︙ | | |
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
|
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
|
-
+
|
- (void)deleteEnclosingWhitespaces
{
[self deleteLeadingWhitespaces];
[self deleteTrailingWhitespaces];
}
- copy
- (id)copy
{
return [[OFString alloc] initWithString: self];
}
- (void)makeImmutable
{
}
@end
|
Modified src/OFMutableString_UTF8.m
from [4a3385c744]
to [4eb8ccee47].
︙ | | |
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
-
-
+
+
|
@implementation OFMutableString_UTF8
+ (void)initialize
{
if (self == [OFMutableString_UTF8 class])
[self inheritMethodsFromClass: [OFString_UTF8 class]];
}
- initWithUTF8StringNoCopy: (char *)UTF8String
freeWhenDone: (bool)freeWhenDone
- (instancetype)initWithUTF8StringNoCopy: (char *)UTF8String
freeWhenDone: (bool)freeWhenDone
{
@try {
self = [self initWithUTF8String: UTF8String];
} @finally {
if (freeWhenDone)
free(UTF8String);
}
|
︙ | | |
Modified src/OFMutableTarArchiveEntry.m
from [f0f930a3ee]
to [a4dc22b0d5].
︙ | | |
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
-
+
|
#import "OFString.h"
#import "OFDate.h"
@implementation OFMutableTarArchiveEntry
@dynamic fileName, mode, UID, GID, size, modificationDate, type, targetFileName;
@dynamic owner, group, deviceMajor, deviceMinor;
- copy
- (id)copy
{
OFMutableTarArchiveEntry *copy = [self mutableCopy];
[copy makeImmutable];
return copy;
}
|
︙ | | |
Modified src/OFMutableTriple.m
from [d48b052c76]
to [4592e90254].
︙ | | |
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
-
+
|
- (void)setThirdObject: (id)thirdObject
{
id old = _thirdObject;
_thirdObject = [thirdObject retain];
[old release];
}
- copy
- (id)copy
{
OFMutableTriple *copy = [self mutableCopy];
[copy makeImmutable];
return copy;
}
- (void)makeImmutable
{
object_setClass(self, [OFTriple class]);
}
@end
|
Modified src/OFMutableURL.h
from [8fd67661ad]
to [d41b6f1dcf].
︙ | | |
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
-
+
|
+ (instancetype)URL;
/*!
* @brief Initializes an already allocated OFMutableURL.
*
* @return An initialized OFMutableURL
*/
- init;
- (instancetype)init;
/*!
* @brief Converts the mutable URL to an immutable URL.
*/
- (void)makeImmutable;
@end
OF_ASSUME_NONNULL_END
|
Modified src/OFMutableURL.m
from [d83d33a394]
to [aa49ba568a].
︙ | | |
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
-
+
|
@dynamic scheme, host, port, user, password, path, parameters, query, fragment;
+ (instancetype)URL
{
return [[[self alloc] init] autorelease];
}
- init
- (instancetype)init
{
return [super of_init];
}
- (void)setScheme: (OFString *)scheme
{
OFString *old = _scheme;
|
︙ | | |
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
|
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
|
-
+
|
- (void)setFragment: (OFString *)fragment
{
OFString *old = _fragment;
_fragment = [fragment copy];
[old release];
}
- copy
- (id)copy
{
OFMutableURL *copy = [self mutableCopy];
[copy makeImmutable];
return copy;
}
- (void)makeImmutable
{
object_setClass(self, [OFURL class]);
}
@end
|
Modified src/OFMutableZIPArchiveEntry.m
from [fd0258d247]
to [4990b8b9d2].
︙ | | |
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
-
+
|
@implementation OFMutableZIPArchiveEntry
@dynamic fileName, fileComment, extraField, versionMadeBy, minVersionNeeded;
@dynamic modificationDate, compressionMethod, compressedSize, uncompressedSize;
@dynamic CRC32, versionSpecificAttributes, generalPurposeBitFlag;
@dynamic of_localFileHeaderOffset;
- copy
- (id)copy
{
OFMutableZIPArchiveEntry *copy = [self mutableCopy];
[copy makeImmutable];
return copy;
}
|
︙ | | |
Modified src/OFMutex.m
from [fcee48ecda]
to [454d70b9af].
︙ | | |
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
-
+
|
@synthesize name = _name;
+ (instancetype)mutex
{
return [[[self alloc] init] autorelease];
}
- init
- (instancetype)init
{
self = [super init];
if (!of_mutex_new(&_mutex)) {
Class c = [self class];
[self release];
@throw [OFInitializationFailedException exceptionWithClass: c];
|
︙ | | |
Modified src/OFNull.m
from [80f6393652]
to [48127745a8].
︙ | | |
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
-
+
|
}
+ (OFNull *)null
{
return null;
}
- initWithSerialization: (OFXMLElement *)element
- (instancetype)initWithSerialization: (OFXMLElement *)element
{
void *pool;
[self release];
pool = objc_autoreleasePoolPush();
|
︙ | | |
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
-
+
|
}
- (OFString *)description
{
return @"<null>";
}
- copy
- (id)copy
{
return self;
}
- (OFXMLElement *)XMLElementBySerializing
{
void *pool = objc_autoreleasePoolPush();
|
︙ | | |
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
|
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
|
-
+
-
+
|
{
uint8_t type = 0xC0;
return [OFData dataWithItems: &type
count: 1];
}
- autorelease
- (instancetype)autorelease
{
return self;
}
- retain
- (instancetype)retain
{
return self;
}
- (void)release
{
}
|
︙ | | |
Modified src/OFNumber.h
from [b4280b6f63]
to [92dadecb01].
︙ | | |
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
|
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
|
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
|
* @brief Creates a new OFNumber with the specified double.
*
* @param double_ A double which the OFNumber should contain
* @return A new autoreleased OFNumber
*/
+ (instancetype)numberWithDouble: (double)double_;
- init OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
/*!
* @brief Initializes an already allocated OFNumber with the specified bool.
*
* @param bool_ A bool which the OFNumber should contain
* @return An initialized OFNumber
*/
- initWithBool: (bool)bool_;
- (instancetype)initWithBool: (bool)bool_;
/*!
* @brief Initializes an already allocated OFNumber with the specified signed
* char.
*
* @param schar A signed char which the OFNumber should contain
* @return An initialized OFNumber
*/
- initWithChar: (signed char)schar;
- (instancetype)initWithChar: (signed char)schar;
/*!
* @brief Initializes an already allocated OFNumber with the specified signed
* short.
*
* @param sshort A signed short which the OFNumber should contain
* @return An initialized OFNumber
*/
- initWithShort: (signed short)sshort;
- (instancetype)initWithShort: (signed short)sshort;
/*!
* @brief Initializes an already allocated OFNumber with the specified signed
* int.
*
* @param sint A signed int which the OFNumber should contain
* @return An initialized OFNumber
*/
- initWithInt: (signed int)sint;
- (instancetype)initWithInt: (signed int)sint;
/*!
* @brief Initializes an already allocated OFNumber with the specified signed
* long.
*
* @param slong A signed long which the OFNumber should contain
* @return An initialized OFNumber
*/
- initWithLong: (signed long)slong;
- (instancetype)initWithLong: (signed long)slong;
/*!
* @brief Initializes an already allocated OFNumber with the specified signed
* long long.
*
* @param slonglong A signed long long which the OFNumber should contain
* @return An initialized OFNumber
*/
- initWithLongLong: (signed long long)slonglong;
- (instancetype)initWithLongLong: (signed long long)slonglong;
/*!
* @brief Initializes an already allocated OFNumber with the specified unsigned
* char.
*
* @param uchar An unsigned char which the OFNumber should contain
* @return An initialized OFNumber
*/
- initWithUnsignedChar: (unsigned char)uchar;
- (instancetype)initWithUnsignedChar: (unsigned char)uchar;
/*!
* @brief Initializes an already allocated OFNumber with the specified unsigned
* short.
*
* @param ushort An unsigned short which the OFNumber should contain
* @return An initialized OFNumber
*/
- initWithUnsignedShort: (unsigned short)ushort;
- (instancetype)initWithUnsignedShort: (unsigned short)ushort;
/*!
* @brief Initializes an already allocated OFNumber with the specified unsigned
* int.
*
* @param uint An unsigned int which the OFNumber should contain
* @return An initialized OFNumber
*/
- initWithUnsignedInt: (unsigned int)uint;
- (instancetype)initWithUnsignedInt: (unsigned int)uint;
/*!
* @brief Initializes an already allocated OFNumber with the specified unsigned
* long.
*
* @param ulong An unsigned long which the OFNumber should contain
* @return An initialized OFNumber
*/
- initWithUnsignedLong: (unsigned long)ulong;
- (instancetype)initWithUnsignedLong: (unsigned long)ulong;
/*!
* @brief Initializes an already allocated OFNumber with the specified unsigned
* long long.
*
* @param ulonglong An unsigned long long which the OFNumber should contain
* @return An initialized OFNumber
*/
- initWithUnsignedLongLong: (unsigned long long)ulonglong;
- (instancetype)initWithUnsignedLongLong: (unsigned long long)ulonglong;
/*!
* @brief Initializes an already allocated OFNumber with the specified int8_t.
*
* @param int8 An int8_t which the OFNumber should contain
* @return An initialized OFNumber
*/
- initWithInt8: (int8_t)int8;
- (instancetype)initWithInt8: (int8_t)int8;
/*!
* @brief Initializes an already allocated OFNumber with the specified int16_t.
*
* @param int16 An int16_t which the OFNumber should contain
* @return An initialized OFNumber
*/
- initWithInt16: (int16_t)int16;
- (instancetype)initWithInt16: (int16_t)int16;
/*!
* @brief Initializes an already allocated OFNumber with the specified int32_t.
*
* @param int32 An int32_t which the OFNumber should contain
* @return An initialized OFNumber
*/
- initWithInt32: (int32_t)int32;
- (instancetype)initWithInt32: (int32_t)int32;
/*!
* @brief Initializes an already allocated OFNumber with the specified int64_t.
*
* @param int64 An int64_t which the OFNumber should contain
* @return An initialized OFNumber
*/
- initWithInt64: (int64_t)int64;
- (instancetype)initWithInt64: (int64_t)int64;
/*!
* @brief Initializes an already allocated OFNumber with the specified uint8_t.
*
* @param uint8 A uint8_t which the OFNumber should contain
* @return An initialized OFNumber
*/
- initWithUInt8: (uint8_t)uint8;
- (instancetype)initWithUInt8: (uint8_t)uint8;
/*!
* @brief Initializes an already allocated OFNumber with the specified uint16_t.
*
* @param uint16 A uint16_t which the OFNumber should contain
* @return An initialized OFNumber
*/
- initWithUInt16: (uint16_t)uint16;
- (instancetype)initWithUInt16: (uint16_t)uint16;
/*!
* @brief Initializes an already allocated OFNumber with the specified uint32_t.
*
* @param uint32 A uint32_t which the OFNumber should contain
* @return An initialized OFNumber
*/
- initWithUInt32: (uint32_t)uint32;
- (instancetype)initWithUInt32: (uint32_t)uint32;
/*!
* @brief Initializes an already allocated OFNumber with the specified uint64_t.
*
* @param uint64 A uint64_t which the OFNumber should contain
* @return An initialized OFNumber
*/
- initWithUInt64: (uint64_t)uint64;
- (instancetype)initWithUInt64: (uint64_t)uint64;
/*!
* @brief Initializes an already allocated OFNumber with the specified size_t.
*
* @param size A size_t which the OFNumber should contain
* @return An initialized OFNumber
*/
- initWithSize: (size_t)size;
- (instancetype)initWithSize: (size_t)size;
/*!
* @brief Initializes an already allocated OFNumber with the specified ssize_t.
*
* @param ssize An ssize_t which the OFNumber should contain
* @return An initialized OFNumber
*/
- initWithSSize: (ssize_t)ssize;
- (instancetype)initWithSSize: (ssize_t)ssize;
/*!
* @brief Initializes an already allocated OFNumber with the specified intmax_t.
*
* @param intmax An intmax_t which the OFNumber should contain
* @return An initialized OFNumber
*/
- initWithIntMax: (intmax_t)intmax;
- (instancetype)initWithIntMax: (intmax_t)intmax;
/*!
* @brief Initializes an already allocated OFNumber with the specified
* uintmax_t.
*
* @param uintmax A uintmax_t which the OFNumber should contain
* @return An initialized OFNumber
*/
- initWithUIntMax: (uintmax_t)uintmax;
- (instancetype)initWithUIntMax: (uintmax_t)uintmax;
/*!
* @brief Initializes an already allocated OFNumber with the specified
* ptrdiff_t.
*
* @param ptrdiff A ptrdiff_t which the OFNumber should contain
* @return An initialized OFNumber
*/
- initWithPtrDiff: (ptrdiff_t)ptrdiff;
- (instancetype)initWithPtrDiff: (ptrdiff_t)ptrdiff;
/*!
* @brief Initializes an already allocated OFNumber with the specified intptr_t.
*
* @param intptr An intptr_t which the OFNumber should contain
* @return An initialized OFNumber
*/
- initWithIntPtr: (intptr_t)intptr;
- (instancetype)initWithIntPtr: (intptr_t)intptr;
/*!
* @brief Initializes an already allocated OFNumber with the specified
* uintptr_t.
*
* @param uintptr A uintptr_t which the OFNumber should contain
* @return An initialized OFNumber
*/
- initWithUIntPtr: (uintptr_t)uintptr;
- (instancetype)initWithUIntPtr: (uintptr_t)uintptr;
/*!
* @brief Initializes an already allocated OFNumber with the specified float.
*
* @param float_ A float which the OFNumber should contain
* @return An initialized OFNumber
*/
- initWithFloat: (float)float_;
- (instancetype)initWithFloat: (float)float_;
/*!
* @brief Initializes an already allocated OFNumber with the specified double.
*
* @param double_ A double which the OFNumber should contain
* @return An initialized OFNumber
*/
- initWithDouble: (double)double_;
- (instancetype)initWithDouble: (double)double_;
/*!
* @brief Returns the OFNumber as a bool.
*
* @return The OFNumber as a bool
*/
- (bool)boolValue;
|
︙ | | |
Modified src/OFNumber.m
from [3d97fc0b3e]
to [2a910136b7].
︙ | | |
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
|
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
|
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
|
}
+ (instancetype)numberWithDouble: (double)double_
{
return [[[self alloc] initWithDouble: double_] autorelease];
}
- init
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
- initWithBool: (bool)bool_
- (instancetype)initWithBool: (bool)bool_
{
self = [super init];
_value.bool_ = bool_;
_type = OF_NUMBER_TYPE_BOOL;
return self;
}
- initWithChar: (signed char)schar
- (instancetype)initWithChar: (signed char)schar
{
self = [super init];
_value.schar = schar;
_type = OF_NUMBER_TYPE_CHAR;
return self;
}
- initWithShort: (signed short)sshort
- (instancetype)initWithShort: (signed short)sshort
{
self = [super init];
_value.sshort = sshort;
_type = OF_NUMBER_TYPE_SHORT;
return self;
}
- initWithInt: (signed int)sint
- (instancetype)initWithInt: (signed int)sint
{
self = [super init];
_value.sint = sint;
_type = OF_NUMBER_TYPE_INT;
return self;
}
- initWithLong: (signed long)slong
- (instancetype)initWithLong: (signed long)slong
{
self = [super init];
_value.slong = slong;
_type = OF_NUMBER_TYPE_LONG;
return self;
}
- initWithLongLong: (signed long long)slonglong
- (instancetype)initWithLongLong: (signed long long)slonglong
{
self = [super init];
_value.slonglong = slonglong;
_type = OF_NUMBER_TYPE_LONGLONG;
return self;
}
- initWithUnsignedChar: (unsigned char)uchar
- (instancetype)initWithUnsignedChar: (unsigned char)uchar
{
self = [super init];
_value.uchar = uchar;
_type = OF_NUMBER_TYPE_UCHAR;
return self;
}
- initWithUnsignedShort: (unsigned short)ushort
- (instancetype)initWithUnsignedShort: (unsigned short)ushort
{
self = [super init];
_value.ushort = ushort;
_type = OF_NUMBER_TYPE_USHORT;
return self;
}
- initWithUnsignedInt: (unsigned int)uint
- (instancetype)initWithUnsignedInt: (unsigned int)uint
{
self = [super init];
_value.uint = uint;
_type = OF_NUMBER_TYPE_UINT;
return self;
}
- initWithUnsignedLong: (unsigned long)ulong
- (instancetype)initWithUnsignedLong: (unsigned long)ulong
{
self = [super init];
_value.ulong = ulong;
_type = OF_NUMBER_TYPE_ULONG;
return self;
}
- initWithUnsignedLongLong: (unsigned long long)ulonglong
- (instancetype)initWithUnsignedLongLong: (unsigned long long)ulonglong
{
self = [super init];
_value.ulonglong = ulonglong;
_type = OF_NUMBER_TYPE_ULONGLONG;
return self;
}
- initWithInt8: (int8_t)int8
- (instancetype)initWithInt8: (int8_t)int8
{
self = [super init];
_value.int8 = int8;
_type = OF_NUMBER_TYPE_INT8;
return self;
}
- initWithInt16: (int16_t)int16
- (instancetype)initWithInt16: (int16_t)int16
{
self = [super init];
_value.int16 = int16;
_type = OF_NUMBER_TYPE_INT16;
return self;
}
- initWithInt32: (int32_t)int32
- (instancetype)initWithInt32: (int32_t)int32
{
self = [super init];
_value.int32 = int32;
_type = OF_NUMBER_TYPE_INT32;
return self;
}
- initWithInt64: (int64_t)int64
- (instancetype)initWithInt64: (int64_t)int64
{
self = [super init];
_value.int64 = int64;
_type = OF_NUMBER_TYPE_INT64;
return self;
}
- initWithUInt8: (uint8_t)uint8
- (instancetype)initWithUInt8: (uint8_t)uint8
{
self = [super init];
_value.uint8 = uint8;
_type = OF_NUMBER_TYPE_UINT8;
return self;
}
- initWithUInt16: (uint16_t)uint16
- (instancetype)initWithUInt16: (uint16_t)uint16
{
self = [super init];
_value.uint16 = uint16;
_type = OF_NUMBER_TYPE_UINT16;
return self;
}
- initWithUInt32: (uint32_t)uint32
- (instancetype)initWithUInt32: (uint32_t)uint32
{
self = [super init];
_value.uint32 = uint32;
_type = OF_NUMBER_TYPE_UINT32;
return self;
}
- initWithUInt64: (uint64_t)uint64
- (instancetype)initWithUInt64: (uint64_t)uint64
{
self = [super init];
_value.uint64 = uint64;
_type = OF_NUMBER_TYPE_UINT64;
return self;
}
- initWithSize: (size_t)size
- (instancetype)initWithSize: (size_t)size
{
self = [super init];
_value.size = size;
_type = OF_NUMBER_TYPE_SIZE;
return self;
}
- initWithSSize: (ssize_t)ssize
- (instancetype)initWithSSize: (ssize_t)ssize
{
self = [super init];
_value.ssize = ssize;
_type = OF_NUMBER_TYPE_SSIZE;
return self;
}
- initWithIntMax: (intmax_t)intmax
- (instancetype)initWithIntMax: (intmax_t)intmax
{
self = [super init];
_value.intmax = intmax;
_type = OF_NUMBER_TYPE_INTMAX;
return self;
}
- initWithUIntMax: (uintmax_t)uintmax
- (instancetype)initWithUIntMax: (uintmax_t)uintmax
{
self = [super init];
_value.uintmax = uintmax;
_type = OF_NUMBER_TYPE_UINTMAX;
return self;
}
- initWithPtrDiff: (ptrdiff_t)ptrdiff
- (instancetype)initWithPtrDiff: (ptrdiff_t)ptrdiff
{
self = [super init];
_value.ptrdiff = ptrdiff;
_type = OF_NUMBER_TYPE_PTRDIFF;
return self;
}
- initWithIntPtr: (intptr_t)intptr
- (instancetype)initWithIntPtr: (intptr_t)intptr
{
self = [super init];
_value.intptr = intptr;
_type = OF_NUMBER_TYPE_INTPTR;
return self;
}
- initWithUIntPtr: (uintptr_t)uintptr
- (instancetype)initWithUIntPtr: (uintptr_t)uintptr
{
self = [super init];
_value.uintptr = uintptr;
_type = OF_NUMBER_TYPE_UINTPTR;
return self;
}
- initWithFloat: (float)float_
- (instancetype)initWithFloat: (float)float_
{
self = [super init];
_value.float_ = float_;
_type = OF_NUMBER_TYPE_FLOAT;
return self;
}
- initWithDouble: (double)double_
- (instancetype)initWithDouble: (double)double_
{
self = [super init];
_value.double_ = double_;
_type = OF_NUMBER_TYPE_DOUBLE;
return self;
}
- initWithSerialization: (OFXMLElement *)element
- (instancetype)initWithSerialization: (OFXMLElement *)element
{
self = [super init];
@try {
void *pool = objc_autoreleasePoolPush();
OFString *typeString;
|
︙ | | |
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
|
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
|
-
+
|
}
OF_HASH_FINALIZE(hash);
return hash;
}
- copy
- (id)copy
{
return [self retain];
}
- (OFString *)description
{
OFMutableString *ret;
|
︙ | | |
Modified src/OFObject.h
from [cbc749740e]
to [39e5e50197].
︙ | | |
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
|
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
|
-
+
|
/*!
* @brief Increases the retain count.
*
* Each time an object is released, the retain count gets decreased and the
* object deallocated if it reaches 0.
*/
- retain;
- (instancetype)retain;
/*!
* @brief Returns the retain count.
*
* @return The retain count
*/
- (unsigned int)retainCount;
|
︙ | | |
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
|
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
|
-
+
-
+
|
/*!
* @brief Adds the object to the topmost OFAutoreleasePool of the thread's
* autorelease pool stack.
*
* @return The object
*/
- autorelease;
- (instancetype)autorelease;
/*!
* @brief Returns the receiver.
*
* @return The receiver
*/
- self;
- (instancetype)self;
/*!
* @brief Returns whether the object is a proxy object.
*
* @return A boolean whether the object is a proxy object
*/
- (bool)isProxy;
|
︙ | | |
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
|
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
|
-
+
-
+
|
* pool for the object.
*
* This method will never return `nil`, instead, it will throw an
* @ref OFAllocFailedException.
*
* @return The allocated object
*/
+ alloc;
+ (instancetype)alloc;
/*!
* @brief Allocates memory for a new instance and calls @ref init on it.
* @return An allocated and initialized object
*/
+ new;
+ (instancetype)new;
/*!
* @brief Returns the class.
*
* @return The class
*/
+ (Class)class;
|
︙ | | |
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
|
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
|
-
+
-
+
|
* @brief Returns the class.
*
* This method exists so that classes can be used in collections requiring
* conformance to the OFCopying protocol.
*
* @return The class of the object
*/
+ copy;
+ (id)copy;
/*!
* @brief Initializes an already allocated object.
*
* Derived classes may override this, but need to do
* @code
* self = [super init]
* @endcode
* before they do any initialization themselves. @ref init may never return
* `nil`, instead an exception (for example @ref
* OFInitializationFailedException) should be thrown.
*
* @return An initialized object
*/
- init;
- (instancetype)init;
/*!
* @brief Returns the method signature for the specified selector.
*
* @param selector The selector for which the method signature should be
* returned
* @return The method signature for the specified selector
|
︙ | | |
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
|
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
|
-
+
-
+
|
*
* For classes which can be immutable or mutable, this returns an immutable
* copy. If only a mutable version of the class exists, it creates a mutable
* copy.
*
* @return A copy of the object
*/
- copy;
- (id)copy;
@end
/*!
* @protocol OFMutableCopying OFObject.h ObjFW/OFObject.h
*
* @brief A protocol for the creation of mutable copies.
*
* This protocol is implemented by objects that can be mutable and immutable
* and allows returning a mutable copy.
*/
@protocol OFMutableCopying
/*!
* @brief Creates a mutable copy of the object.
*
* @return A mutable copy of the object
*/
- mutableCopy;
- (id)mutableCopy;
@end
/*!
* @protocol OFComparing OFObject.h ObjFW/OFObject.h
*
* @brief A protocol for comparing objects.
*
|
︙ | | |
Modified src/OFObject.m
from [d94672b28e]
to [fdaee34133].
︙ | | |
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
|
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
|
-
+
-
+
|
{
}
+ (void)initialize
{
}
+ alloc
+ (instancetype)alloc
{
return of_alloc_object(self, 0, 0, NULL);
}
+ new
+ (instancetype)new
{
return [[self alloc] init];
}
+ (Class)class
{
return self;
|
︙ | | |
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
|
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
|
-
+
|
}
+ (BOOL)resolveInstanceMethod: (SEL)selector
{
return NO;
}
- init
- (instancetype)init
{
return self;
}
- (Class)class
{
return object_getClass(self);
|
︙ | | |
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
|
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
|
-
+
|
- (void)doesNotRecognizeSelector: (SEL)selector
{
@throw [OFNotImplementedException exceptionWithSelector: selector
object: self];
}
- retain
- (instancetype)retain
{
#if defined(OF_HAVE_ATOMIC_OPS)
of_atomic_int_inc(&PRE_IVARS->retainCount);
#else
OF_ENSURE(of_spinlock_lock(&PRE_IVARS->retainCountSpinlock));
PRE_IVARS->retainCount++;
OF_ENSURE(of_spinlock_unlock(&PRE_IVARS->retainCountSpinlock));
|
︙ | | |
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
|
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
|
-
+
-
+
|
OF_ENSURE(of_spinlock_unlock(&PRE_IVARS->retainCountSpinlock));
if (c == 0)
[self dealloc];
#endif
}
- autorelease
- (instancetype)autorelease
{
return _objc_rootAutorelease(self);
}
- self
- (instancetype)self
{
return self;
}
- (bool)isProxy
{
return false;
|
︙ | | |
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
|
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
|
-
+
-
+
|
iter = next;
}
free((char *)self - PRE_IVARS_ALIGN);
}
/* Required to use properties with the Apple runtime */
- copyWithZone: (void *)zone
- (id)copyWithZone: (void *)zone
{
if OF_UNLIKELY (zone != NULL) {
[self doesNotRecognizeSelector: _cmd];
abort();
}
return [(id)self copy];
}
- mutableCopyWithZone: (void *)zone
- (id)mutableCopyWithZone: (void *)zone
{
if OF_UNLIKELY (zone != NULL) {
[self doesNotRecognizeSelector: _cmd];
abort();
}
return [(id)self mutableCopy];
|
︙ | | |
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
|
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
|
-
+
-
+
-
+
-
+
-
+
|
}
+ (void)freeMemory: (void *)pointer
{
OF_UNRECOGNIZED_SELECTOR
}
+ retain
+ (id)retain
{
return self;
}
+ autorelease
+ (id)autorelease
{
return self;
}
+ (unsigned int)retainCount
{
return OF_RETAIN_COUNT_MAX;
}
+ (void)release
{
}
+ (void)dealloc
{
OF_UNRECOGNIZED_SELECTOR
}
+ copy
+ (id)copy
{
return self;
}
+ mutableCopyWithZone: (void *)zone
+ (id)mutableCopyWithZone: (void *)zone
{
OF_UNRECOGNIZED_SELECTOR
}
/* Required to use ObjFW from Swift */
+ allocWithZone: (void *)zone
+ (instancetype)allocWithZone: (void *)zone
{
if OF_UNLIKELY (zone != NULL) {
[self doesNotRecognizeSelector: _cmd];
abort();
}
return [self alloc];
}
@end
|
Modified src/OFOptionsParser.h
from [b57dc17fb3]
to [77474cff80].
︙ | | |
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
|
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
|
-
+
-
+
|
* accepted options, terminated with an option whose short
* option is `\0` and long option is `nil`.
*
* @return A new, autoreleased OFOptionsParser
*/
+ (instancetype)parserWithOptions: (const of_options_parser_option_t *)options;
- init OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
/*!
* @brief Initializes an already allocated OFOptionsParser so that it accepts
* the specified options.
*
* @param options An array of @ref of_options_parser_option_t specifying all
* accepted options, terminated with an option whose short
* option is `\0` and long option is `nil`.
*
* @return An initialized OFOptionsParser
*/
- initWithOptions: (const of_options_parser_option_t *)options
- (instancetype)initWithOptions: (const of_options_parser_option_t *)options
OF_DESIGNATED_INITIALIZER;
/*!
* @brief Returns the next option.
*
* If the option is only available as a long option, `-` is returned.
* Otherwise, the short option is returned, even if it was specified as a long
|
︙ | | |
Modified src/OFOptionsParser.m
from [f1e270d342]
to [652b61f6f7].
︙ | | |
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
-
+
-
+
|
@synthesize argument = _argument;
+ (instancetype)parserWithOptions: (const of_options_parser_option_t *)options
{
return [[[self alloc] initWithOptions: options] autorelease];
}
- init
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
- initWithOptions: (const of_options_parser_option_t *)options
- (instancetype)initWithOptions: (const of_options_parser_option_t *)options
{
self = [super init];
@try {
size_t count = 0;
const of_options_parser_option_t *iter;
of_options_parser_option_t *iter2;
|
︙ | | |
Modified src/OFPair.h
from [e6ee23e713]
to [2a7841384c].
︙ | | |
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
-
-
+
+
|
/*!
* @brief Initializes an already allocated OFPair with the specified objects.
*
* @param firstObject The first object for the pair
* @param secondObject The second object for the pair
* @return An initialized OFPair
*/
- initWithFirstObject: (nullable FirstType)firstObject
secondObject: (nullable SecondType)secondObject;
- (instancetype)initWithFirstObject: (nullable FirstType)firstObject
secondObject: (nullable SecondType)secondObject;
#if !defined(OF_HAVE_GENERICS) && !defined(DOXYGEN)
# undef FirstType
# undef SecondType
#endif
@end
OF_ASSUME_NONNULL_END
#import "OFMutablePair.h"
|
Modified src/OFPair.m
from [2880b7d607]
to [e5cb38f069].
︙ | | |
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
-
-
+
+
|
+ (instancetype)pairWithFirstObject: (id)firstObject
secondObject: (id)secondObject
{
return [[[self alloc] initWithFirstObject: firstObject
secondObject: secondObject] autorelease];
}
- initWithFirstObject: (id)firstObject
secondObject: (id)secondObject
- (instancetype)initWithFirstObject: (id)firstObject
secondObject: (id)secondObject
{
self = [super init];
@try {
_firstObject = [firstObject retain];
_secondObject = [secondObject retain];
} @catch (id e) {
|
︙ | | |
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
|
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
|
-
+
-
+
|
OF_HASH_ADD_HASH(hash, [_secondObject hash]);
OF_HASH_FINALIZE(hash);
return hash;
}
- copy
- (id)copy
{
return [self retain];
}
- mutableCopy
- (id)mutableCopy
{
return [[OFMutablePair alloc] initWithFirstObject: _firstObject
secondObject: _secondObject];
}
- (OFString *)description
{
return [OFString stringWithFormat: @"<<%@, %@>>",
_firstObject, _secondObject];
}
@end
|
Modified src/OFPlugin.m
from [5fa3fa154b]
to [89bdff5a7e].
︙ | | |
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
|
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
|
-
+
|
exceptionWithClass: self];
}
plugin->_handle = handle;
return plugin;
}
- init
- (instancetype)init
{
if (object_getClass(self) == [OFPlugin class]) {
@try {
[self doesNotRecognizeSelector: _cmd];
} @catch (id e) {
[self release];
@throw e;
|
︙ | | |
Modified src/OFProcess.h
from [b8f13557bc]
to [b0f7aa5681].
︙ | | |
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
|
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
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
|
-
+
-
+
+
-
-
+
+
+
-
-
-
+
+
+
+
-
-
-
-
-
+
+
+
+
+
|
+ (instancetype)
processWithProgram: (OFString *)program
programName: (OFString *)programName
arguments: (nullable OFArray OF_GENERIC(OFString *) *)arguments
environment: (nullable OFDictionary
OF_GENERIC(OFString *, OFString *) *)environment;
- init OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
/*!
* @brief Initializes an already allocated OFProcess with the specified program
* and invokes the program.
*
* @param program The program to execute. If it does not start with a slash, the
* search path specified in PATH is used.
* @return An initialized OFProcess.
*/
- initWithProgram: (OFString *)program;
- (instancetype)initWithProgram: (OFString *)program;
/*!
* @brief Initializes an already allocated OFProcess with the specified program
* and arguments and invokes the program.
*
* @param program The program to execute. If it does not start with a slash, the
* search path specified in PATH is used.
* @param arguments The arguments to pass to the program, or `nil`
* @return An initialized OFProcess.
*/
- (instancetype)
- initWithProgram: (OFString *)program
arguments: (nullable OFArray OF_GENERIC(OFString *) *)arguments;
initWithProgram: (OFString *)program
arguments: (nullable OFArray OF_GENERIC(OFString *) *)arguments;
/*!
* @brief Initializes an already allocated OFProcess with the specified program,
* program name and arguments and invokes the program.
*
* @param program The program to execute. If it does not start with a slash, the
* search path specified in PATH is used.
* @param programName The program name for the program to invoke (argv[0]).
* Usually, this is equal to program.
* @param arguments The arguments to pass to the program, or `nil`
* @return An initialized OFProcess.
*/
- (instancetype)
- initWithProgram: (OFString *)program
programName: (OFString *)programName
arguments: (nullable OFArray OF_GENERIC(OFString *) *)arguments;
initWithProgram: (OFString *)program
programName: (OFString *)programName
arguments: (nullable OFArray OF_GENERIC(OFString *) *)arguments;
/*!
* @brief Initializes an already allocated OFProcess with the specified program,
* program name, arguments and environment and invokes the program.
*
* @param program The program to execute. If it does not start with a slash, the
* search path specified in PATH is used.
* @param programName The program name for the program to invoke (argv[0]).
* Usually, this is equal to program.
* @param arguments The arguments to pass to the program, or `nil`
* @param environment The environment to pass to the program, or `nil`. If it
* is not `nil`, the passed dictionary will be used to
* override the environment. If you want to add to the
* existing environment, you need to get the existing
* environment first, copy it, modify it and then pass it.
* @return An initialized OFProcess.
*/
- (instancetype)
- initWithProgram: (OFString *)program
programName: (OFString *)programName
arguments: (nullable OFArray OF_GENERIC(OFString *) *)arguments
environment: (nullable OFDictionary
OF_GENERIC(OFString *, OFString *) *)environment
initWithProgram: (OFString *)program
programName: (OFString *)programName
arguments: (nullable OFArray OF_GENERIC(OFString *) *)arguments
environment: (nullable OFDictionary
OF_GENERIC(OFString *, OFString *) *)environment
OF_DESIGNATED_INITIALIZER;
/*!
* @brief Closes the write direction of the process.
*
* This method needs to be called for some programs before data can be read,
* since some programs don't start processing before the write direction is
* closed.
*/
- (void)closeForWriting;
@end
OF_ASSUME_NONNULL_END
|
Modified src/OFProcess.m
from [7459e546ae]
to [47e26e30a9].
︙ | | |
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
133
134
135
136
137
138
139
140
|
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
133
134
135
136
137
138
139
140
|
-
+
-
+
-
-
+
+
-
-
-
+
+
+
-
-
-
-
+
+
+
+
|
{
return [[[self alloc] initWithProgram: program
programName: programName
arguments: arguments
environment: environment] autorelease];
}
- init
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
- initWithProgram: (OFString *)program
- (instancetype)initWithProgram: (OFString *)program
{
return [self initWithProgram: program
programName: program
arguments: nil
environment: nil];
}
- initWithProgram: (OFString *)program
arguments: (OFArray *)arguments
- (instancetype)initWithProgram: (OFString *)program
arguments: (OFArray *)arguments
{
return [self initWithProgram: program
programName: program
arguments: arguments
environment: nil];
}
- initWithProgram: (OFString *)program
programName: (OFString *)programName
arguments: (OFArray *)arguments
- (instancetype)initWithProgram: (OFString *)program
programName: (OFString *)programName
arguments: (OFArray *)arguments
{
return [self initWithProgram: program
programName: program
arguments: arguments
environment: nil];
}
- initWithProgram: (OFString *)program
programName: (OFString *)programName
arguments: (OFArray *)arguments
environment: (OFDictionary *)environment
- (instancetype)initWithProgram: (OFString *)program
programName: (OFString *)programName
arguments: (OFArray *)arguments
environment: (OFDictionary *)environment
{
self = [super init];
@try {
#ifndef OF_WINDOWS
void *pool = objc_autoreleasePoolPush();
const char *path;
|
︙ | | |
Modified src/OFRIPEMD160Hash.m
from [9e827ae911]
to [717962a6c4].
︙ | | |
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
|
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
|
-
+
-
+
|
}
+ (instancetype)cryptoHash
{
return [[[self alloc] init] autorelease];
}
- init
- (instancetype)init
{
self = [super init];
[self of_resetState];
return self;
}
- (void)dealloc
{
[self reset];
[super dealloc];
}
- copy
- (id)copy
{
OFRIPEMD160Hash *copy = [[OFRIPEMD160Hash alloc] init];
memcpy(copy->_state, _state, sizeof(_state));
copy->_bits = _bits;
memcpy(©->_buffer, &_buffer, sizeof(_buffer));
copy->_bufferLength = _bufferLength;
|
︙ | | |
Modified src/OFRecursiveMutex.m
from [5791a36f8a]
to [ed38788e90].
︙ | | |
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
-
+
|
@synthesize name = _name;
+ (instancetype)mutex
{
return [[[self alloc] init] autorelease];
}
- init
- (instancetype)init
{
self = [super init];
if (!of_rmutex_new(&_rmutex)) {
Class c = [self class];
[self release];
@throw [OFInitializationFailedException exceptionWithClass: c];
|
︙ | | |
Modified src/OFRunLoop.m
from [2cf7056bd3]
to [03e94e120d].
︙ | | |
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
|
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
|
-
+
|
[runLoop->_readQueues removeObjectForKey: object];
}
objc_autoreleasePoolPop(pool);
}
#endif
- init
- (instancetype)init
{
self = [super init];
@try {
_timersQueue = [[OFSortedList alloc] init];
#ifdef OF_HAVE_THREADS
_timersQueueLock = [[OFMutex alloc] init];
|
︙ | | |
Modified src/OFSHA1Hash.m
from [cd2db0fc50]
to [f22e843ed9].
︙ | | |
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
133
134
|
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
133
134
|
-
+
-
+
|
}
+ (instancetype)cryptoHash
{
return [[[self alloc] init] autorelease];
}
- init
- (instancetype)init
{
self = [super init];
[self of_resetState];
return self;
}
- (void)dealloc
{
[self reset];
[super dealloc];
}
- copy
- (id)copy
{
OFSHA1Hash *copy = [[OFSHA1Hash alloc] init];
memcpy(copy->_state, _state, sizeof(_state));
copy->_bits = _bits;
memcpy(©->_buffer, &_buffer, sizeof(_buffer));
copy->_bufferLength = _bufferLength;
|
︙ | | |
Modified src/OFSHA224Or256Hash.m
from [280841ab34]
to [223f1ca854].
︙ | | |
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
|
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
|
-
+
|
}
+ (instancetype)cryptoHash
{
return [[[self alloc] init] autorelease];
}
- init
- (instancetype)init
{
self = [super init];
@try {
if ([self class] == [OFSHA224Or256Hash class]) {
[self doesNotRecognizeSelector: _cmd];
abort();
|
︙ | | |
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
|
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
|
-
+
|
- (void)dealloc
{
[self reset];
[super dealloc];
}
- copy
- (id)copy
{
OFSHA224Or256Hash *copy = [[[self class] alloc] init];
memcpy(copy->_state, _state, sizeof(_state));
copy->_bits = _bits;
memcpy(©->_buffer, &_buffer, sizeof(_buffer));
copy->_bufferLength = _bufferLength;
|
︙ | | |
Modified src/OFSHA384Or512Hash.m
from [6ff07dab9e]
to [7ebbc5c21e].
︙ | | |
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
|
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
|
-
+
|
}
+ (instancetype)cryptoHash
{
return [[[self alloc] init] autorelease];
}
- init
- (instancetype)init
{
self = [super init];
@try {
if ([self class] == [OFSHA384Or512Hash class]) {
[self doesNotRecognizeSelector: _cmd];
abort();
|
︙ | | |
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
|
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
|
-
+
|
- (void)dealloc
{
[self reset];
[super dealloc];
}
- copy
- (id)copy
{
OFSHA384Or512Hash *copy = [[[self class] alloc] init];
memcpy(copy->_state, _state, sizeof(_state));
memcpy(copy->_bits, _bits, sizeof(_bits));
memcpy(©->_buffer, &_buffer, sizeof(_buffer));
copy->_bufferLength = _bufferLength;
|
︙ | | |
Modified src/OFSandbox.m
from [0482993709]
to [aa77760050].
︙ | | |
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
|
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
|
-
+
|
}
- (bool)allowsBPF
{
return _allowsBPF;
}
- copy
- (id)copy
{
OFSandbox *copy = [[OFSandbox alloc] init];
copy->_allowsStdIO = _allowsStdIO;
copy->_allowsReadingFiles = _allowsReadingFiles;
copy->_allowsWritingFiles = _allowsWritingFiles;
copy->_allowsCreatingFiles = _allowsCreatingFiles;
|
︙ | | |
Modified src/OFSeekableStream.m
from [5b2fde875e]
to [b98ac3f694].
︙ | | |
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
-
+
|
#include <stdlib.h>
#include <stdio.h>
#import "OFSeekableStream.h"
@implementation OFSeekableStream
- init
- (instancetype)init
{
if (object_getClass(self) == [OFSeekableStream class]) {
@try {
[self doesNotRecognizeSelector: _cmd];
abort();
} @catch (id e) {
[self release];
|
︙ | | |
Modified src/OFSerialization.h
from [140cf6aa4f]
to [678a1fbe4d].
︙ | | |
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
-
+
|
@protocol OFSerialization
/*!
* @brief Initializes the object with the specified XML element serialization.
*
* @param element An OFXMLElement with the serialized object
* @return An initialized object
*/
- initWithSerialization: (OFXMLElement *)element;
- (instancetype)initWithSerialization: (OFXMLElement *)element;
/*!
* @brief Serializes the object into an XML element.
*
* @return The object serialized into an XML element
*/
- (OFXMLElement *)XMLElementBySerializing;
@end
OF_ASSUME_NONNULL_END
|
Modified src/OFSet.h
from [28701b2ea5]
to [6c82eb5230].
︙ | | |
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
|
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
|
-
+
-
+
-
+
-
-
+
+
-
-
+
+
|
/*!
* @brief Initializes an already allocated set with the specified set.
*
* @param set The set to initialize the set with
* @return An initialized set with the specified set
*/
- initWithSet: (OFSet OF_GENERIC(ObjectType) *)set;
- (instancetype)initWithSet: (OFSet OF_GENERIC(ObjectType) *)set;
/*!
* @brief Initializes an already allocated set with the specified array.
*
* @param array The array to initialize the set with
* @return An initialized set with the specified array
*/
- initWithArray: (OFArray OF_GENERIC(ObjectType) *)array;
- (instancetype)initWithArray: (OFArray OF_GENERIC(ObjectType) *)array;
/*!
* @brief Initializes an already allocated set with the specified objects.
*
* @param firstObject The first object for the set
* @return An initialized set with the specified objects
*/
- initWithObjects: (ObjectType)firstObject, ...;
- (instancetype)initWithObjects: (ObjectType)firstObject, ...;
/*!
* @brief Initializes an already allocated set with the specified objects.
*
* @param objects An array of objects for the set
* @param count The number of objects in the specified array
* @return An initialized set with the specified objects
*/
- initWithObjects: (ObjectType const _Nonnull *_Nonnull)objects
count: (size_t)count;
- (instancetype)initWithObjects: (ObjectType const _Nonnull *_Nonnull)objects
count: (size_t)count;
/*!
* @brief Initializes an already allocated set with the specified object and
* va_list.
*
* @param firstObject The first object for the set
* @param arguments A va_list with the other objects
* @return An initialized set with the specified object and va_list
*/
- initWithObject: (ObjectType)firstObject
arguments: (va_list)arguments;
- (instancetype)initWithObject: (ObjectType)firstObject
arguments: (va_list)arguments;
/*!
* @brief Returns whether the receiver is a subset of the specified set.
*
* @return Whether the receiver is a subset of the specified set
*/
- (bool)isSubsetOfSet: (OFSet OF_GENERIC(ObjectType) *)set;
|
︙ | | |
Modified src/OFSet.m
from [9a3d14535d]
to [3a024855e7].
︙ | | |
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
|
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
|
-
+
-
+
-
+
-
+
-
-
+
+
-
-
+
+
-
+
-
+
-
+
|
Class isa;
} placeholder;
@interface OFSet_placeholder: OFSet
@end
@implementation OFSet_placeholder
- init
- (instancetype)init
{
return (id)[[OFSet_hashtable alloc] init];
}
- initWithSet: (OFSet *)set
- (instancetype)initWithSet: (OFSet *)set
{
return (id)[[OFSet_hashtable alloc] initWithSet: set];
}
- initWithArray: (OFArray *)array
- (instancetype)initWithArray: (OFArray *)array
{
return (id)[[OFSet_hashtable alloc] initWithArray: array];
}
- initWithObjects: (id)firstObject, ...
- (instancetype)initWithObjects: (id)firstObject, ...
{
id ret;
va_list arguments;
va_start(arguments, firstObject);
ret = [[OFSet_hashtable alloc] initWithObject: firstObject
arguments: arguments];
va_end(arguments);
return ret;
}
- initWithObjects: (id const *)objects
count: (size_t)count
- (instancetype)initWithObjects: (id const *)objects
count: (size_t)count
{
return (id)[[OFSet_hashtable alloc] initWithObjects: objects
count: count];
}
- initWithObject: (id)firstObject
arguments: (va_list)arguments
- (instancetype)initWithObject: (id)firstObject
arguments: (va_list)arguments
{
return (id)[[OFSet_hashtable alloc] initWithObject: firstObject
arguments: arguments];
}
- initWithSerialization: (OFXMLElement *)element
- (instancetype)initWithSerialization: (OFXMLElement *)element
{
return (id)[[OFSet_hashtable alloc] initWithSerialization: element];
}
- retain
- (instancetype)retain
{
return self;
}
- autorelease
- (instancetype)autorelease
{
return self;
}
- (void)release
{
}
|
︙ | | |
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
|
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
|
-
+
|
@implementation OFSet
+ (void)initialize
{
if (self == [OFSet class])
placeholder.isa = [OFSet_placeholder class];
}
+ alloc
+ (instancetype)alloc
{
if (self == [OFSet class])
return (id)&placeholder;
return [super alloc];
}
|
︙ | | |
146
147
148
149
150
151
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
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
204
205
206
207
208
209
210
211
|
146
147
148
149
150
151
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
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
204
205
206
207
208
209
210
211
|
-
+
-
+
-
+
-
+
-
+
-
-
+
+
-
+
|
+ (instancetype)setWithObjects: (id const *)objects
count: (size_t)count
{
return [[[self alloc] initWithObjects: objects
count: count] autorelease];
}
- init
- (instancetype)init
{
if (object_getClass(self) == [OFSet class]) {
@try {
[self doesNotRecognizeSelector: _cmd];
} @catch (id e) {
[self release];
@throw e;
}
abort();
}
return [super init];
}
- initWithSet: (OFSet *)set
- (instancetype)initWithSet: (OFSet *)set
{
OF_INVALID_INIT_METHOD
}
- initWithArray: (OFArray *)array
- (instancetype)initWithArray: (OFArray *)array
{
OF_INVALID_INIT_METHOD
}
- initWithObjects: (id const *)objects
- (instancetype)initWithObjects: (id const *)objects
count: (size_t)count
{
OF_INVALID_INIT_METHOD
}
- (id)initWithObjects: (id)firstObject, ...
- (instancetype)initWithObjects: (id)firstObject, ...
{
id ret;
va_list arguments;
va_start(arguments, firstObject);
ret = [self initWithObject: firstObject
arguments: arguments];
va_end(arguments);
return ret;
}
- initWithObject: (id)firstObject
arguments: (va_list)arguments
- (instancetype)initWithObject: (id)firstObject
arguments: (va_list)arguments
{
OF_INVALID_INIT_METHOD
}
- initWithSerialization: (OFXMLElement *)element
- (instancetype)initWithSerialization: (OFXMLElement *)element
{
OF_INVALID_INIT_METHOD
}
- (size_t)count
{
OF_UNRECOGNIZED_SELECTOR
|
︙ | | |
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
|
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
|
-
+
-
+
|
[ret makeImmutable];
objc_autoreleasePoolPop(pool);
return ret;
}
- copy
- (id)copy
{
return [self retain];
}
- mutableCopy
- (id)mutableCopy
{
return [[OFMutableSet alloc] initWithSet: self];
}
- (bool)isSubsetOfSet: (OFSet *)set
{
for (id object in self)
|
︙ | | |
Modified src/OFSet_hashtable.h
from [1b1cdb3cf6]
to [c639f48f81].
︙ | | |
21
22
23
24
25
26
27
28
29
30
31
|
21
22
23
24
25
26
27
28
29
30
31
|
-
+
|
@class OFMapTable;
@interface OFSet_hashtable: OFSet
{
OFMapTable *_mapTable;
}
- initWithCapacity: (size_t)capacity;
- (instancetype)initWithCapacity: (size_t)capacity;
@end
OF_ASSUME_NONNULL_END
|
Modified src/OFSet_hashtable.m
from [dab1aab8a3]
to [59c9aa82a8].
︙ | | |
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
|
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
|
-
+
-
+
-
+
|
.release = release,
.hash = hash,
.equal = equal
};
static const of_map_table_functions_t objectFunctions = { NULL };
@implementation OFSet_hashtable
- init
- (instancetype)init
{
return [self initWithCapacity: 0];
}
- initWithCapacity: (size_t)capacity
- (instancetype)initWithCapacity: (size_t)capacity
{
self = [super init];
@try {
_mapTable = [[OFMapTable alloc]
initWithKeyFunctions: keyFunctions
objectFunctions: objectFunctions
capacity: capacity];
} @catch (id e) {
[self release];
@throw e;
}
return self;
}
- initWithSet: (OFSet *)set
- (instancetype)initWithSet: (OFSet *)set
{
size_t count;
if (set == nil)
return [self init];
@try {
|
︙ | | |
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
|
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
|
-
+
|
[self release];
@throw e;
}
return self;
}
- initWithArray: (OFArray *)array
- (instancetype)initWithArray: (OFArray *)array
{
size_t count;
if (array == nil)
return self;
@try {
|
︙ | | |
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
|
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
|
-
-
+
+
-
-
+
+
|
[self release];
@throw e;
}
return self;
}
- initWithObjects: (id const *)objects
count: (size_t)count
- (instancetype)initWithObjects: (id const *)objects
count: (size_t)count
{
self = [self initWithCapacity: count];
@try {
for (size_t i = 0; i < count; i++)
[_mapTable setObject: (void *)1
forKey: objects[i]];
} @catch (id e) {
[self release];
@throw e;
}
return self;
}
- initWithObject: (id)firstObject
arguments: (va_list)arguments
- (instancetype)initWithObject: (id)firstObject
arguments: (va_list)arguments
{
self = [super init];
@try {
id object;
va_list argumentsCopy;
size_t count;
|
︙ | | |
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
|
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
|
-
+
|
[self release];
@throw e;
}
return self;
}
- initWithSerialization: (OFXMLElement *)element
- (instancetype)initWithSerialization: (OFXMLElement *)element
{
self = [self init];
@try {
void *pool = objc_autoreleasePoolPush();
if ((![[element name] isEqual: @"OFSet"] &&
|
︙ | | |
Modified src/OFSettings.h
from [92ccb51f12]
to [92c168909f].
︙ | | |
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
|
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
|
-
+
-
+
|
*
* @param applicationName The name of the application whose settings should be
* accessed
* @return A new, autoreleased OFSettings instance
*/
+ (instancetype)settingsWithApplicationName: (OFString *)applicationName;
- init OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
/*!
* @brief Initializes an already allocated OFSettings instance with the
* specified application name.
*
* @param applicationName The name of the application whose settings should be
* accessed
* @return An initialized OFSettings instance
*/
- initWithApplicationName: (OFString *)applicationName
- (instancetype)initWithApplicationName: (OFString *)applicationName
OF_DESIGNATED_INITIALIZER;
/*!
* @brief Sets the specified path to the specified string.
*
* @param string The string to set
* @param path The path to store the string at
|
︙ | | |
Modified src/OFSettings.m
from [a8dee6588b]
to [5a9246138a].
︙ | | |
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
|
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
|
-
+
-
+
-
+
|
#import "OFSettings.h"
#import "OFSettings_INIFile.h"
#import "OFString.h"
@implementation OFSettings
@synthesize applicationName = _applicationName;
+ alloc
+ (instancetype)alloc
{
if (self == [OFSettings class])
return [OFSettings_INIFile alloc];
return [super alloc];
}
+ (instancetype)settingsWithApplicationName: (OFString *)applicationName
{
return [[[self alloc]
initWithApplicationName: applicationName] autorelease];
}
- init
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
- initWithApplicationName: (OFString *)applicationName
- (instancetype)initWithApplicationName: (OFString *)applicationName
{
self = [super init];
@try {
_applicationName = [applicationName copy];
} @catch (id e) {
@throw e;
|
︙ | | |
Modified src/OFSettings_INIFile.m
from [458ae98147]
to [8cfaeaee2d].
︙ | | |
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
-
+
|
#import "OFSettings_INIFile.h"
#import "OFString.h"
#import "OFArray.h"
#import "OFINIFile.h"
#import "OFSystemInfo.h"
@implementation OFSettings_INIFile
- initWithApplicationName: (OFString *)applicationName
- (instancetype)initWithApplicationName: (OFString *)applicationName
{
self = [super initWithApplicationName: applicationName];
@try {
void *pool = objc_autoreleasePoolPush();
OFString *fileName;
|
︙ | | |
Modified src/OFStdIOStream.h
from [791f773daf]
to [4a5715f270].
︙ | | |
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
-
+
|
#else
BPTR _handle;
bool _closable;
#endif
bool _atEndOfStream;
}
- init OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
/*!
* @brief Query the underlying terminal for the number of columns.
*
* @return The number of columns, or -1 if there is no underlying terminal or
* the number of columns could not be queried
*/
|
︙ | | |
Modified src/OFStdIOStream.m
from [f210109307]
to [3619228f8c].
︙ | | |
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
|
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
|
-
+
|
closable: outputClosable];
of_stderr = [[OFStdIOStream alloc] of_initWithHandle: error
closable: errorClosable];
# endif
}
#endif
- init
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
#ifndef OF_MORPHOS
- (instancetype)of_initWithFileDescriptor: (int)fd
{
|
︙ | | |
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
|
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
|
-
+
-
+
|
_handle = 0;
#endif
[super close];
}
- autorelease
- (instancetype)autorelease
{
return self;
}
- retain
- (instancetype)retain
{
return self;
}
- (void)release
{
}
|
︙ | | |
Modified src/OFStream.m
from [815f2dd728]
to [313554e809].
︙ | | |
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
-
+
|
+ (void)initialize
{
if (self == [OFStream class])
signal(SIGPIPE, SIG_IGN);
}
#endif
- init
- (instancetype)init
{
if (object_getClass(self) == [OFStream class]) {
@try {
[self doesNotRecognizeSelector: _cmd];
abort();
} @catch (id e) {
[self release];
|
︙ | | |
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
|
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
|
-
+
|
- (size_t)lowlevelWriteBuffer: (const void *)buffer
length: (size_t)length
{
OF_UNRECOGNIZED_SELECTOR
}
- copy
- (id)copy
{
return [self retain];
}
- (bool)isAtEndOfStream
{
if (_readBufferLength > 0)
|
︙ | | |
Modified src/OFString.h
from [bb11f44cdb]
to [54b5ea6d82].
︙ | | |
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
|
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
|
-
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
-
+
+
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
-
+
+
-
-
-
+
+
+
-
+
-
-
+
+
-
-
+
+
-
-
-
+
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
|
/*!
* @brief Initializes an already allocated OFString from a UTF-8 encoded C
* string.
*
* @param UTF8String A UTF-8 encoded C string to initialize the OFString with
* @return An initialized OFString
*/
- initWithUTF8String: (const char *)UTF8String;
- (instancetype)initWithUTF8String: (const char *)UTF8String;
/*!
* @brief Initializes an already allocated OFString from a UTF-8 encoded C
* string with the specified length.
*
* @param UTF8String A UTF-8 encoded C string to initialize the OFString with
* @param UTF8StringLength The length of the UTF-8 encoded C string
* @return An initialized OFString
*/
- initWithUTF8String: (const char *)UTF8String
length: (size_t)UTF8StringLength;
- (instancetype)initWithUTF8String: (const char *)UTF8String
length: (size_t)UTF8StringLength;
/*!
* @brief Initializes an already allocated OFString from an UTF-8 encoded C
* string without copying it, if possible.
*
* @note Mutable versions always create a copy!
*
* @param UTF8String A UTF-8 encoded C string to initialize the OFString with
* @param freeWhenDone Whether to free the C string when it is not needed
* anymore
* @return An initialized OFString
*/
- initWithUTF8StringNoCopy: (char *)UTF8String
freeWhenDone: (bool)freeWhenDone;
- (instancetype)initWithUTF8StringNoCopy: (char *)UTF8String
freeWhenDone: (bool)freeWhenDone;
/*!
* @brief Initializes an already allocated OFString from a C string with the
* specified encoding.
*
* @param cString A C string to initialize the OFString with
* @param encoding The encoding of the C string
* @return An initialized OFString
*/
- initWithCString: (const char *)cString
encoding: (of_string_encoding_t)encoding;
- (instancetype)initWithCString: (const char *)cString
encoding: (of_string_encoding_t)encoding;
/*!
* @brief Initializes an already allocated OFString from a C string with the
* specified encoding and length.
*
* @param cString A C string to initialize the OFString with
* @param encoding The encoding of the C string
* @param cStringLength The length of the C string
* @return An initialized OFString
*/
- initWithCString: (const char *)cString
encoding: (of_string_encoding_t)encoding
length: (size_t)cStringLength;
- (instancetype)initWithCString: (const char *)cString
encoding: (of_string_encoding_t)encoding
length: (size_t)cStringLength;
/*!
* @brief Initializes an already allocated OFString from OFData with the
* specified encoding.
*
* @param data OFData with the contents of the string
* @param encoding The encoding in which the string is stored in the OFData
* @return An initialized OFString
*/
- initWithData: (OFData *)data
encoding: (of_string_encoding_t)encoding;
- (instancetype)initWithData: (OFData *)data
encoding: (of_string_encoding_t)encoding;
/*!
* @brief Initializes an already allocated OFString with another string.
*
* @param string A string to initialize the OFString with
* @return An initialized OFString
*/
- initWithString: (OFString *)string;
- (instancetype)initWithString: (OFString *)string;
/*!
* @brief Initializes an already allocated OFString with a Unicode string with
* the specified length.
*
* @param characters An array of Unicode characters
* @param length The length of the Unicode character array
* @return An initialized OFString
*/
- initWithCharacters: (const of_unichar_t *)characters
length: (size_t)length;
- (instancetype)initWithCharacters: (const of_unichar_t *)characters
length: (size_t)length;
/*!
* @brief Initializes an already allocated OFString with a UTF-16 string.
*
* @param string The UTF-16 string
* @return An initialized OFString
*/
- initWithUTF16String: (const char16_t *)string;
- (instancetype)initWithUTF16String: (const char16_t *)string;
/*!
* @brief Initializes an already allocated OFString with a UTF-16 string with
* the specified length.
*
* @param string The UTF-16 string
* @param length The length of the UTF-16 string
* @return An initialized OFString
*/
- initWithUTF16String: (const char16_t *)string
length: (size_t)length;
- (instancetype)initWithUTF16String: (const char16_t *)string
length: (size_t)length;
/*!
* @brief Initializes an already allocated OFString with a UTF-16 string,
* assuming the specified byte order if no byte order mark is found.
*
* @param string The UTF-16 string
* @param byteOrder The byte order to assume if there is no byte order mark
* @return An initialized OFString
*/
- initWithUTF16String: (const char16_t *)string
byteOrder: (of_byte_order_t)byteOrder;
- (instancetype)initWithUTF16String: (const char16_t *)string
byteOrder: (of_byte_order_t)byteOrder;
/*!
* @brief Initializes an already allocated OFString with a UTF-16 string with
* the specified length, assuming the specified byte order if no byte
* order mark is found.
*
* @param string The UTF-16 string
* @param length The length of the UTF-16 string
* @param byteOrder The byte order to assume if there is no byte order mark
* @return An initialized OFString
*/
- initWithUTF16String: (const char16_t *)string
length: (size_t)length
byteOrder: (of_byte_order_t)byteOrder;
- (instancetype)initWithUTF16String: (const char16_t *)string
length: (size_t)length
byteOrder: (of_byte_order_t)byteOrder;
/*!
* @brief Initializes an already allocated OFString with a UTF-32 string.
*
* @param string The UTF-32 string
* @return An initialized OFString
*/
- initWithUTF32String: (const char32_t *)string;
- (instancetype)initWithUTF32String: (const char32_t *)string;
/*!
* @brief Initializes an already allocated OFString with a UTF-32 string with
* the specified length
*
* @param string The UTF-32 string
* @param length The length of the UTF-32 string
* @return An initialized OFString
*/
- initWithUTF32String: (const char32_t *)string
length: (size_t)length;
- (instancetype)initWithUTF32String: (const char32_t *)string
length: (size_t)length;
/*!
* @brief Initializes an already allocated OFString with a UTF-32 string,
* assuming the specified byte order if no byte order mark is found.
*
* @param string The UTF-32 string
* @param byteOrder The byte order to assume if there is no byte order mark
* @return An initialized OFString
*/
- initWithUTF32String: (const char32_t *)string
byteOrder: (of_byte_order_t)byteOrder;
- (instancetype)initWithUTF32String: (const char32_t *)string
byteOrder: (of_byte_order_t)byteOrder;
/*!
* @brief Initializes an already allocated OFString with a UTF-32 string with
* the specified length, assuming the specified byte order if no byte
* order mark is found.
*
* @param string The UTF-32 string
* @param length The length of the UTF-32 string
* @param byteOrder The byte order to assume if there is no byte order mark
* @return An initialized OFString
*/
- initWithUTF32String: (const char32_t *)string
length: (size_t)length
byteOrder: (of_byte_order_t)byteOrder;
- (instancetype)initWithUTF32String: (const char32_t *)string
length: (size_t)length
byteOrder: (of_byte_order_t)byteOrder;
/*!
* @brief Initializes an already allocated OFString with a format string.
*
* See printf for the format syntax. As an addition, `%@` is available as
* format specifier for objects, `%C` for `of_unichar_t` and `%S` for
* `const of_unichar_t *`.
*
* @param format A string used as format to initialize the OFString
* @return An initialized OFString
*/
- initWithFormat: (OFConstantString *)format, ...;
- (instancetype)initWithFormat: (OFConstantString *)format, ...;
/*!
* @brief Initializes an already allocated OFString with a format string.
*
* See printf for the format syntax. As an addition, `%@` is available as
* format specifier for objects, `%C` for `of_unichar_t` and `%S` for
* `const of_unichar_t *`.
*
* @param format A string used as format to initialize the OFString
* @param arguments The arguments used in the format string
* @return An initialized OFString
*/
- initWithFormat: (OFConstantString *)format
arguments: (va_list)arguments;
- (instancetype)initWithFormat: (OFConstantString *)format
arguments: (va_list)arguments;
#ifdef OF_HAVE_FILES
/*!
* @brief Initializes an already allocated OFString with the contents of the
* specified file in the specified encoding.
*
* @param path The path to the file
* @return An initialized OFString
*/
- initWithContentsOfFile: (OFString *)path;
- (instancetype)initWithContentsOfFile: (OFString *)path;
/*!
* @brief Initializes an already allocated OFString with the contents of the
* specified file in the specified encoding.
*
* @param path The path to the file
* @param encoding The encoding of the file
* @return An initialized OFString
*/
- initWithContentsOfFile: (OFString *)path
encoding: (of_string_encoding_t)encoding;
- (instancetype)initWithContentsOfFile: (OFString *)path
encoding: (of_string_encoding_t)encoding;
#endif
#if defined(OF_HAVE_FILES) || defined(OF_HAVE_SOCKETS)
/*!
* @brief Initializes an already allocated OFString with the contents of the
* specified URL.
*
* If the URL's scheme is file, it tries UTF-8 encoding.
*
* If the URL's scheme is http(s), it tries to detect the encoding from the HTTP
* headers. If it could not detect the encoding using the HTTP headers, it tries
* UTF-8.
*
* @param URL The URL to the contents for the string
* @return An initialized OFString
*/
- initWithContentsOfURL: (OFURL *)URL;
- (instancetype)initWithContentsOfURL: (OFURL *)URL;
/*!
* @brief Initializes an already allocated OFString with the contents of the
* specified URL in the specified encoding.
*
* @param URL The URL to the contents for the string
* @param encoding The encoding to assume
* @return An initialized OFString
*/
- initWithContentsOfURL: (OFURL *)URL
encoding: (of_string_encoding_t)encoding;
- (instancetype)initWithContentsOfURL: (OFURL *)URL
encoding: (of_string_encoding_t)encoding;
#endif
/*!
* @brief Writes the OFString into the specified C string with the specified
* encoding.
*
* @param cString The C string to write into
|
︙ | | |
Modified src/OFString.m
from [661e4352a9]
to [0cbd68fca6].
︙ | | |
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
|
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
|
-
+
-
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
-
+
+
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
-
+
+
-
-
-
+
+
+
-
+
-
-
+
+
-
-
+
+
-
-
-
+
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
+
-
+
-
+
|
Class isa;
} placeholder;
@interface OFString_placeholder: OFString
@end
@implementation OFString_placeholder
- init
- (instancetype)init
{
return (id)[[OFString_UTF8 alloc] init];
}
- initWithUTF8String: (const char *)UTF8String
- (instancetype)initWithUTF8String: (const char *)UTF8String
{
id string;
size_t length;
void *storage;
length = strlen(UTF8String);
string = of_alloc_object([OFString_UTF8 class],
length + 1, 1, &storage);
return (id)[string of_initWithUTF8String: UTF8String
length: length
storage: storage];
}
- initWithUTF8String: (const char *)UTF8String
length: (size_t)UTF8StringLength
- (instancetype)initWithUTF8String: (const char *)UTF8String
length: (size_t)UTF8StringLength
{
id string;
void *storage;
string = of_alloc_object([OFString_UTF8 class],
UTF8StringLength + 1, 1, &storage);
return (id)[string of_initWithUTF8String: UTF8String
length: UTF8StringLength
storage: storage];
}
- initWithUTF8StringNoCopy: (char *)UTF8String
freeWhenDone: (bool)freeWhenDone
- (instancetype)initWithUTF8StringNoCopy: (char *)UTF8String
freeWhenDone: (bool)freeWhenDone
{
return (id)[[OFString_UTF8 alloc]
initWithUTF8StringNoCopy: UTF8String
freeWhenDone: freeWhenDone];
}
- initWithCString: (const char *)cString
encoding: (of_string_encoding_t)encoding
- (instancetype)initWithCString: (const char *)cString
encoding: (of_string_encoding_t)encoding
{
if (encoding == OF_STRING_ENCODING_UTF_8) {
id string;
size_t length;
void *storage;
length = strlen(cString);
string = of_alloc_object([OFString_UTF8 class],
length + 1, 1, &storage);
return (id)[string of_initWithUTF8String: cString
length: length
storage: storage];
}
return (id)[[OFString_UTF8 alloc] initWithCString: cString
encoding: encoding];
}
- initWithCString: (const char *)cString
encoding: (of_string_encoding_t)encoding
length: (size_t)cStringLength
- (instancetype)initWithCString: (const char *)cString
encoding: (of_string_encoding_t)encoding
length: (size_t)cStringLength
{
if (encoding == OF_STRING_ENCODING_UTF_8) {
id string;
void *storage;
string = of_alloc_object([OFString_UTF8 class],
cStringLength + 1, 1, &storage);
return (id)[string of_initWithUTF8String: cString
length: cStringLength
storage: storage];
}
return (id)[[OFString_UTF8 alloc] initWithCString: cString
encoding: encoding
length: cStringLength];
}
- initWithData: (OFData *)data
encoding: (of_string_encoding_t)encoding
- (instancetype)initWithData: (OFData *)data
encoding: (of_string_encoding_t)encoding
{
return (id)[[OFString_UTF8 alloc] initWithData: data
encoding: encoding];
}
- initWithString: (OFString *)string
- (instancetype)initWithString: (OFString *)string
{
return (id)[[OFString_UTF8 alloc] initWithString: string];
}
- initWithCharacters: (const of_unichar_t *)string
length: (size_t)length
- (instancetype)initWithCharacters: (const of_unichar_t *)string
length: (size_t)length
{
return (id)[[OFString_UTF8 alloc] initWithCharacters: string
length: length];
}
- initWithUTF16String: (const char16_t *)string
- (instancetype)initWithUTF16String: (const char16_t *)string
{
return (id)[[OFString_UTF8 alloc] initWithUTF16String: string];
}
- initWithUTF16String: (const char16_t *)string
length: (size_t)length
- (instancetype)initWithUTF16String: (const char16_t *)string
length: (size_t)length
{
return (id)[[OFString_UTF8 alloc] initWithUTF16String: string
length: length];
}
- initWithUTF16String: (const char16_t *)string
byteOrder: (of_byte_order_t)byteOrder
- (instancetype)initWithUTF16String: (const char16_t *)string
byteOrder: (of_byte_order_t)byteOrder
{
return (id)[[OFString_UTF8 alloc] initWithUTF16String: string
byteOrder: byteOrder];
}
- initWithUTF16String: (const char16_t *)string
length: (size_t)length
byteOrder: (of_byte_order_t)byteOrder
- (instancetype)initWithUTF16String: (const char16_t *)string
length: (size_t)length
byteOrder: (of_byte_order_t)byteOrder
{
return (id)[[OFString_UTF8 alloc] initWithUTF16String: string
length: length
byteOrder: byteOrder];
}
- initWithUTF32String: (const char32_t *)string
- (instancetype)initWithUTF32String: (const char32_t *)string
{
return (id)[[OFString_UTF8 alloc] initWithUTF32String: string];
}
- initWithUTF32String: (const char32_t *)string
length: (size_t)length
- (instancetype)initWithUTF32String: (const char32_t *)string
length: (size_t)length
{
return (id)[[OFString_UTF8 alloc] initWithUTF32String: string
length: length];
}
- initWithUTF32String: (const char32_t *)string
byteOrder: (of_byte_order_t)byteOrder
- (instancetype)initWithUTF32String: (const char32_t *)string
byteOrder: (of_byte_order_t)byteOrder
{
return (id)[[OFString_UTF8 alloc] initWithUTF32String: string
byteOrder: byteOrder];
}
- initWithUTF32String: (const char32_t *)string
length: (size_t)length
byteOrder: (of_byte_order_t)byteOrder
- (instancetype)initWithUTF32String: (const char32_t *)string
length: (size_t)length
byteOrder: (of_byte_order_t)byteOrder
{
return (id)[[OFString_UTF8 alloc] initWithUTF32String: string
length: length
byteOrder: byteOrder];
}
- initWithFormat: (OFConstantString *)format, ...
- (instancetype)initWithFormat: (OFConstantString *)format, ...
{
id ret;
va_list arguments;
va_start(arguments, format);
ret = [[OFString_UTF8 alloc] initWithFormat: format
arguments: arguments];
va_end(arguments);
return ret;
}
- initWithFormat: (OFConstantString *)format
arguments: (va_list)arguments
- (instancetype)initWithFormat: (OFConstantString *)format
arguments: (va_list)arguments
{
return (id)[[OFString_UTF8 alloc] initWithFormat: format
arguments: arguments];
}
#ifdef OF_HAVE_FILES
- initWithContentsOfFile: (OFString *)path
- (instancetype)initWithContentsOfFile: (OFString *)path
{
return (id)[[OFString_UTF8 alloc] initWithContentsOfFile: path];
}
- initWithContentsOfFile: (OFString *)path
encoding: (of_string_encoding_t)encoding
- (instancetype)initWithContentsOfFile: (OFString *)path
encoding: (of_string_encoding_t)encoding
{
return (id)[[OFString_UTF8 alloc] initWithContentsOfFile: path
encoding: encoding];
}
#endif
#if defined(OF_HAVE_FILES) || defined(OF_HAVE_SOCKETS)
- initWithContentsOfURL: (OFURL *)URL
- (instancetype)initWithContentsOfURL: (OFURL *)URL
{
return (id)[[OFString_UTF8 alloc] initWithContentsOfURL: URL];
}
- initWithContentsOfURL: (OFURL *)URL
encoding: (of_string_encoding_t)encoding
- (instancetype)initWithContentsOfURL: (OFURL *)URL
encoding: (of_string_encoding_t)encoding
{
return (id)[[OFString_UTF8 alloc] initWithContentsOfURL: URL
encoding: encoding];
}
#endif
- initWithSerialization: (OFXMLElement *)element
- (instancetype)initWithSerialization: (OFXMLElement *)element
{
return (id)[[OFString_UTF8 alloc] initWithSerialization: element];
}
- retain
- (instancetype)retain
{
return self;
}
- autorelease
- (instancetype)autorelease
{
return self;
}
- (void)release
{
}
|
︙ | | |
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
|
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
|
-
+
|
#if defined(HAVE_STRTOF_L) || defined(HAVE_STRTOD_L)
if ((cLocale = newlocale(LC_ALL_MASK, "C", NULL)) == NULL)
@throw [OFInitializationFailedException
exceptionWithClass: self];
#endif
}
+ alloc
+ (instancetype)alloc
{
if (self == [OFString class])
return (id)&placeholder;
return [super alloc];
}
|
︙ | | |
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
|
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
|
-
+
-
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
-
+
+
+
-
-
+
+
-
+
-
-
+
+
-
+
-
-
+
+
-
-
+
+
-
-
-
+
+
+
-
+
-
-
+
+
-
-
+
+
-
-
-
+
+
+
-
+
-
-
+
+
-
+
-
-
+
+
|
first = false;
}
return ret;
}
- init
- (instancetype)init
{
if (object_getClass(self) == [OFString class]) {
@try {
[self doesNotRecognizeSelector: _cmd];
} @catch (id e) {
[self release];
@throw e;
}
abort();
}
return [super init];
}
- initWithUTF8String: (const char *)UTF8String
- (instancetype)initWithUTF8String: (const char *)UTF8String
{
return [self initWithCString: UTF8String
encoding: OF_STRING_ENCODING_UTF_8
length: strlen(UTF8String)];
}
- initWithUTF8String: (const char *)UTF8String
length: (size_t)UTF8StringLength
- (instancetype)initWithUTF8String: (const char *)UTF8String
length: (size_t)UTF8StringLength
{
return [self initWithCString: UTF8String
encoding: OF_STRING_ENCODING_UTF_8
length: UTF8StringLength];
}
- initWithUTF8StringNoCopy: (char *)UTF8String
freeWhenDone: (bool)freeWhenDone
- (instancetype)initWithUTF8StringNoCopy: (char *)UTF8String
freeWhenDone: (bool)freeWhenDone
{
return [self initWithUTF8String: UTF8String];
}
- initWithCString: (const char *)cString
encoding: (of_string_encoding_t)encoding
- (instancetype)initWithCString: (const char *)cString
encoding: (of_string_encoding_t)encoding
{
return [self initWithCString: cString
encoding: encoding
length: strlen(cString)];
}
- initWithCString: (const char *)cString
encoding: (of_string_encoding_t)encoding
length: (size_t)cStringLength
- (instancetype)initWithCString: (const char *)cString
encoding: (of_string_encoding_t)encoding
length: (size_t)cStringLength
{
OF_INVALID_INIT_METHOD
}
- initWithData: (OFData *)data
encoding: (of_string_encoding_t)encoding
- (instancetype)initWithData: (OFData *)data
encoding: (of_string_encoding_t)encoding
{
@try {
if ([data itemSize] != 1)
@throw [OFInvalidArgumentException exception];
self = [self initWithCString: [data items]
encoding: encoding
length: [data count]];
} @catch (id e) {
[self release];
@throw e;
}
return self;
}
- initWithString: (OFString *)string
- (instancetype)initWithString: (OFString *)string
{
OF_INVALID_INIT_METHOD
}
- initWithCharacters: (const of_unichar_t *)string
length: (size_t)length
- (instancetype)initWithCharacters: (const of_unichar_t *)string
length: (size_t)length
{
OF_INVALID_INIT_METHOD
}
- initWithUTF16String: (const char16_t *)string
- (instancetype)initWithUTF16String: (const char16_t *)string
{
return [self initWithUTF16String: string
length: of_string_utf16_length(string)
byteOrder: OF_BYTE_ORDER_NATIVE];
}
- initWithUTF16String: (const char16_t *)string
length: (size_t)length
- (instancetype)initWithUTF16String: (const char16_t *)string
length: (size_t)length
{
return [self initWithUTF16String: string
length: length
byteOrder: OF_BYTE_ORDER_NATIVE];
}
- initWithUTF16String: (const char16_t *)string
byteOrder: (of_byte_order_t)byteOrder
- (instancetype)initWithUTF16String: (const char16_t *)string
byteOrder: (of_byte_order_t)byteOrder
{
return [self initWithUTF16String: string
length: of_string_utf16_length(string)
byteOrder: byteOrder];
}
- initWithUTF16String: (const char16_t *)string
length: (size_t)length
byteOrder: (of_byte_order_t)byteOrder
- (instancetype)initWithUTF16String: (const char16_t *)string
length: (size_t)length
byteOrder: (of_byte_order_t)byteOrder
{
OF_INVALID_INIT_METHOD
}
- initWithUTF32String: (const char32_t *)string
- (instancetype)initWithUTF32String: (const char32_t *)string
{
return [self initWithUTF32String: string
length: of_string_utf32_length(string)
byteOrder: OF_BYTE_ORDER_NATIVE];
}
- initWithUTF32String: (const char32_t *)string
length: (size_t)length
- (instancetype)initWithUTF32String: (const char32_t *)string
length: (size_t)length
{
return [self initWithUTF32String: string
length: length
byteOrder: OF_BYTE_ORDER_NATIVE];
}
- initWithUTF32String: (const char32_t *)string
byteOrder: (of_byte_order_t)byteOrder
- (instancetype)initWithUTF32String: (const char32_t *)string
byteOrder: (of_byte_order_t)byteOrder
{
return [self initWithUTF32String: string
length: of_string_utf32_length(string)
byteOrder: byteOrder];
}
- initWithUTF32String: (const char32_t *)string
length: (size_t)length
byteOrder: (of_byte_order_t)byteOrder
- (instancetype)initWithUTF32String: (const char32_t *)string
length: (size_t)length
byteOrder: (of_byte_order_t)byteOrder
{
OF_INVALID_INIT_METHOD
}
- initWithFormat: (OFConstantString *)format, ...
- (instancetype)initWithFormat: (OFConstantString *)format, ...
{
id ret;
va_list arguments;
va_start(arguments, format);
ret = [self initWithFormat: format
arguments: arguments];
va_end(arguments);
return ret;
}
- initWithFormat: (OFConstantString *)format
arguments: (va_list)arguments
- (instancetype)initWithFormat: (OFConstantString *)format
arguments: (va_list)arguments
{
OF_INVALID_INIT_METHOD
}
#ifdef OF_HAVE_FILES
- initWithContentsOfFile: (OFString *)path
- (instancetype)initWithContentsOfFile: (OFString *)path
{
return [self initWithContentsOfFile: path
encoding: OF_STRING_ENCODING_UTF_8];
}
- initWithContentsOfFile: (OFString *)path
encoding: (of_string_encoding_t)encoding
- (instancetype)initWithContentsOfFile: (OFString *)path
encoding: (of_string_encoding_t)encoding
{
char *tmp;
of_offset_t fileSize;
@try {
OFFile *file;
|
︙ | | |
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
|
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
|
-
+
-
-
+
+
|
[self freeMemory: tmp];
return self;
}
#endif
#if defined(OF_HAVE_FILES) || defined(OF_HAVE_SOCKETS)
- initWithContentsOfURL: (OFURL *)URL
- (instancetype)initWithContentsOfURL: (OFURL *)URL
{
return [self initWithContentsOfURL: URL
encoding: OF_STRING_ENCODING_AUTODETECT];
}
- initWithContentsOfURL: (OFURL *)URL
encoding: (of_string_encoding_t)encoding
- (instancetype)initWithContentsOfURL: (OFURL *)URL
encoding: (of_string_encoding_t)encoding
{
void *pool = objc_autoreleasePoolPush();
OFString *scheme = [URL scheme];
# ifdef OF_HAVE_FILES
if ([scheme isEqual: @"file"]) {
if (encoding == OF_STRING_ENCODING_AUTODETECT)
|
︙ | | |
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
|
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
|
-
+
|
objc_autoreleasePoolPop(pool);
return self;
}
#endif
- initWithSerialization: (OFXMLElement *)element
- (instancetype)initWithSerialization: (OFXMLElement *)element
{
@try {
void *pool = objc_autoreleasePoolPush();
if (![[element namespace] isEqual: OF_SERIALIZATION_NS])
@throw [OFInvalidArgumentException exception];
|
︙ | | |
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
|
1496
1497
1498
1499
1500
1501
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
|
-
+
-
+
|
}
objc_autoreleasePoolPop(pool);
return true;
}
- copy
- (id)copy
{
return [self retain];
}
- mutableCopy
- (id)mutableCopy
{
return [[OFMutableString alloc] initWithString: self];
}
- (of_comparison_result_t)compare: (id <OFComparing>)object
{
void *pool;
|
︙ | | |
Modified src/OFString_UTF8.m
from [62af83b584]
to [3425587555].
︙ | | |
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
|
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
|
-
+
|
if (++index > length)
return OF_NOT_FOUND;
return index;
}
@implementation OFString_UTF8
- init
- (instancetype)init
{
self = [super init];
@try {
_s = &_storage;
_s->cString = [self allocMemoryWithSize: 1];
|
︙ | | |
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
|
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
|
-
-
-
+
+
+
|
[self release];
@throw e;
}
return self;
}
- initWithCString: (const char *)cString
encoding: (of_string_encoding_t)encoding
length: (size_t)cStringLength
- (instancetype)initWithCString: (const char *)cString
encoding: (of_string_encoding_t)encoding
length: (size_t)cStringLength
{
self = [super init];
@try {
const char16_t *table;
size_t tableOffset, j;
|
︙ | | |
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
|
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
|
-
-
+
+
|
[self release];
@throw e;
}
return self;
}
- initWithUTF8StringNoCopy: (char *)UTF8String
freeWhenDone: (bool)freeWhenDone
- (instancetype)initWithUTF8StringNoCopy: (char *)UTF8String
freeWhenDone: (bool)freeWhenDone
{
self = [super init];
@try {
size_t UTF8StringLength = strlen(UTF8String);
if (UTF8StringLength >= 3 &&
|
︙ | | |
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
|
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
|
-
+
|
[self release];
@throw e;
}
return self;
}
- initWithString: (OFString *)string
- (instancetype)initWithString: (OFString *)string
{
self = [super init];
@try {
_s = &_storage;
_s->cStringLength = [string UTF8StringLength];
|
︙ | | |
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
|
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
|
-
-
+
+
|
[self release];
@throw e;
}
return self;
}
- initWithCharacters: (const of_unichar_t *)characters
length: (size_t)length
- (instancetype)initWithCharacters: (const of_unichar_t *)characters
length: (size_t)length
{
self = [super init];
@try {
size_t j;
_s = &_storage;
|
︙ | | |
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
|
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
|
-
-
-
+
+
+
|
[self release];
@throw e;
}
return self;
}
- initWithUTF16String: (const char16_t *)string
length: (size_t)length
byteOrder: (of_byte_order_t)byteOrder
- (instancetype)initWithUTF16String: (const char16_t *)string
length: (size_t)length
byteOrder: (of_byte_order_t)byteOrder
{
self = [super init];
@try {
size_t j;
bool swap = false;
|
︙ | | |
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
|
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
|
-
-
-
+
+
+
|
[self release];
@throw e;
}
return self;
}
- initWithUTF32String: (const char32_t *)characters
length: (size_t)length
byteOrder: (of_byte_order_t)byteOrder
- (instancetype)initWithUTF32String: (const char32_t *)characters
length: (size_t)length
byteOrder: (of_byte_order_t)byteOrder
{
self = [super init];
@try {
size_t j;
bool swap = false;
|
︙ | | |
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
|
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
|
-
-
+
+
|
[self release];
@throw e;
}
return self;
}
- initWithFormat: (OFConstantString *)format
arguments: (va_list)arguments
- (instancetype)initWithFormat: (OFConstantString *)format
arguments: (va_list)arguments
{
self = [super init];
@try {
char *tmp;
int cStringLength;
|
︙ | | |
Modified src/OFSystemInfo.m
from [254f78a8f6]
to [5a19cbf413].
︙ | | |
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
|
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
|
-
+
|
# if defined(HAVE_SYSCONF) && defined(_SC_NPROCESSORS_CONF)
if ((numberOfCPUs = sysconf(_SC_NPROCESSORS_CONF)) < 1)
# endif
numberOfCPUs = 1;
#endif
}
+ alloc
+ (instancetype)alloc
{
OF_UNRECOGNIZED_SELECTOR
}
+ (size_t)pageSize
{
return pageSize;
|
︙ | | |
Modified src/OFTCPSocket.m
from [bfcab86676]
to [f8b1b83a89].
︙ | | |
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
133
134
135
136
137
138
139
|
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
133
134
135
136
137
138
139
140
|
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
|
id _context;
# ifdef OF_HAVE_BLOCKS
of_tcp_socket_async_connect_block_t _block;
# endif
id _exception;
}
- initWithSourceThread: (OFThread *)sourceThread
socket: (OFTCPSocket *)socket
host: (OFString *)host
port: (uint16_t)port
target: (id)target
selector: (SEL)selector
context: (id)context;
- (instancetype)initWithSourceThread: (OFThread *)sourceThread
socket: (OFTCPSocket *)socket
host: (OFString *)host
port: (uint16_t)port
target: (id)target
selector: (SEL)selector
context: (id)context;
# ifdef OF_HAVE_BLOCKS
- initWithSourceThread: (OFThread *)sourceThread
socket: (OFTCPSocket *)socket
host: (OFString *)host
port: (uint16_t)port
block: (of_tcp_socket_async_connect_block_t)block;
- (instancetype)initWithSourceThread: (OFThread *)sourceThread
socket: (OFTCPSocket *)socket
host: (OFString *)host
port: (uint16_t)port
block: (of_tcp_socket_async_connect_block_t)
block;
# endif
@end
@implementation OFTCPSocket_ConnectThread
- initWithSourceThread: (OFThread *)sourceThread
socket: (OFTCPSocket *)socket
host: (OFString *)host
port: (uint16_t)port
target: (id)target
selector: (SEL)selector
context: (id)context
- (instancetype)initWithSourceThread: (OFThread *)sourceThread
socket: (OFTCPSocket *)socket
host: (OFString *)host
port: (uint16_t)port
target: (id)target
selector: (SEL)selector
context: (id)context
{
self = [super init];
@try {
_sourceThread = [sourceThread retain];
_socket = [socket retain];
_host = [host copy];
_port = port;
_target = [target retain];
_selector = selector;
_context = [context retain];
} @catch (id e) {
[self release];
@throw e;
}
return self;
}
# ifdef OF_HAVE_BLOCKS
- initWithSourceThread: (OFThread *)sourceThread
socket: (OFTCPSocket *)socket
host: (OFString *)host
port: (uint16_t)port
block: (of_tcp_socket_async_connect_block_t)block
- (instancetype)initWithSourceThread: (OFThread *)sourceThread
socket: (OFTCPSocket *)socket
host: (OFString *)host
port: (uint16_t)port
block: (of_tcp_socket_async_connect_block_t)block
{
self = [super init];
@try {
_sourceThread = [sourceThread retain];
_socket = [socket retain];
_host = [host copy];
|
︙ | | |
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
|
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
|
-
+
|
}
+ (uint16_t)SOCKS5Port
{
return defaultSOCKS5Port;
}
- init
- (instancetype)init
{
self = [super init];
@try {
_socket = INVALID_SOCKET;
_SOCKS5Host = [defaultSOCKS5Host copy];
_SOCKS5Port = defaultSOCKS5Port;
|
︙ | | |
Modified src/OFTLSSocket.h
from [ece0928c2a]
to [19564dc0db].
︙ | | |
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
|
-
+
|
/*!
* @brief Initializes the TLS socket with the specified TCP socket as its
* underlying socket.
*
* @param socket The TCP socket to use as underlying socket
*/
- initWithSocket: (OFTCPSocket *)socket;
- (instancetype)initWithSocket: (OFTCPSocket *)socket;
/*!
* @brief Initiates the TLS handshake.
*
* @note This is only useful if you used @ref initWithSocket: to start TLS on
* a TCP socket which is already connected!
*
|
︙ | | |
Modified src/OFTarArchive.h
from [1f7bc982dd]
to [c8036d2b06].
︙ | | |
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
|
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
|
-
-
+
+
-
-
+
+
|
* @param stream A stream from which the tar archive will be read.
* For append mode, this needs to be an OFSeekableStream.
* @param mode The mode for the tar file. Valid modes are "r" for reading,
* "w" for creating a new file and "a" for appending to an existing
* archive.
* @return An initialized OFTarArchive
*/
- initWithStream: (OF_KINDOF(OFStream *))stream
mode: (OFString *)mode OF_DESIGNATED_INITIALIZER;
- (instancetype)initWithStream: (OF_KINDOF(OFStream *))stream
mode: (OFString *)mode OF_DESIGNATED_INITIALIZER;
#ifdef OF_HAVE_FILES
/*!
* @brief Initializes an already allocated OFTarArchive object with the
* specified file.
*
* @param path The path to the tar archive
* @param mode The mode for the tar file. Valid modes are "r" for reading,
* "w" for creating a new file and "a" for appending to an existing
* archive.
* @return An initialized OFTarArchive
*/
- initWithPath: (OFString *)path
mode: (OFString *)mode;
- (instancetype)initWithPath: (OFString *)path
mode: (OFString *)mode;
#endif
/*!
* @brief Returns the next entry from the tar archive or `nil` if all entries
* have been read.
*
* @note This is only available in read mode.
|
︙ | | |
Modified src/OFTarArchive.m
from [4f6abee812]
to [deb3b00a60].
︙ | | |
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
|
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
|
-
-
+
+
-
-
+
+
-
-
+
+
|
{
OFTarArchiveEntry *_entry;
OF_KINDOF(OFStream *) _stream;
uint64_t _toRead;
bool _atEndOfStream;
}
- initWithStream: (OFStream *)stream
entry: (OFTarArchiveEntry *)entry;
- (instancetype)initWithStream: (OFStream *)stream
entry: (OFTarArchiveEntry *)entry;
- (void)of_skip;
@end
@interface OFTarArchive_FileWriteStream: OFStream
{
OFTarArchiveEntry *_entry;
OFStream *_stream;
uint64_t _toWrite;
}
- initWithStream: (OFStream *)stream
entry: (OFTarArchiveEntry *)entry;
- (instancetype)initWithStream: (OFStream *)stream
entry: (OFTarArchiveEntry *)entry;
@end
@implementation OFTarArchive: OFObject
+ (instancetype)archiveWithStream: (OF_KINDOF(OFStream *))stream
mode: (OFString *)mode
{
return [[[self alloc] initWithStream: stream
mode: mode] autorelease];
}
#ifdef OF_HAVE_FILES
+ (instancetype)archiveWithPath: (OFString *)path
mode: (OFString *)mode
{
return [[[self alloc] initWithPath: path
mode: mode] autorelease];
}
#endif
- initWithStream: (OF_KINDOF(OFStream *))stream
mode: (OFString *)mode
- (instancetype)initWithStream: (OF_KINDOF(OFStream *))stream
mode: (OFString *)mode
{
self = [super init];
@try {
_stream = [stream retain];
if ([mode isEqual: @"r"])
|
︙ | | |
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
|
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
|
-
-
+
+
|
@throw e;
}
return self;
}
#ifdef OF_HAVE_FILES
- initWithPath: (OFString *)path
mode: (OFString *)mode
- (instancetype)initWithPath: (OFString *)path
mode: (OFString *)mode
{
OFFile *file;
if ([mode isEqual: @"a"])
file = [[OFFile alloc] initWithPath: path
mode: @"r+"];
else
|
︙ | | |
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
|
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
|
-
-
+
+
|
[_stream release];
_stream = nil;
}
@end
@implementation OFTarArchive_FileReadStream
- initWithStream: (OFStream *)stream
entry: (OFTarArchiveEntry *)entry
- (instancetype)initWithStream: (OFStream *)stream
entry: (OFTarArchiveEntry *)entry
{
self = [super init];
@try {
_entry = [entry copy];
_stream = [stream retain];
_toRead = [entry size];
|
︙ | | |
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
|
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
|
-
-
+
+
|
[_stream readIntoBuffer: buffer
exactLength: 512 - (size % 512)];
}
}
@end
@implementation OFTarArchive_FileWriteStream
- initWithStream: (OFStream *)stream
entry: (OFTarArchiveEntry *)entry
- (instancetype)initWithStream: (OFStream *)stream
entry: (OFTarArchiveEntry *)entry
{
self = [super init];
@try {
_entry = [entry copy];
_stream = [stream retain];
_toWrite = [entry size];
|
︙ | | |
Modified src/OFTarArchiveEntry.h
from [1927c987a7]
to [7281b80cf5].
︙ | | |
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
|
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
|
-
+
-
+
|
* @brief Creates a new OFTarArchiveEntry with the specified file name.
*
* @param fileName The file name for the OFTarArchiveEntry
* @return A new, autoreleased OFTarArchiveEntry
*/
+ (instancetype)entryWithFileName: (OFString *)fileName;
- init OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
/*!
* @brief Initializes an already allocated OFTarArchiveEntry with the specified
* file name.
*
* @param fileName The file name for the OFTarArchiveEntry
* @return An initialized OFTarArchiveEntry
*/
- initWithFileName: (OFString *)fileName;
- (instancetype)initWithFileName: (OFString *)fileName;
@end
OF_ASSUME_NONNULL_END
#import "OFMutableTarArchiveEntry.h"
|
Modified src/OFTarArchiveEntry.m
from [7043b6c404]
to [77919567f7].
︙ | | |
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
-
+
|
@implementation OFTarArchiveEntry
+ (instancetype)entryWithFileName: (OFString *)fileName
{
return [[[self alloc] initWithFileName: fileName] autorelease];
}
- init
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
- (instancetype)of_initWithHeader: (unsigned char [512])header
{
self = [super init];
|
︙ | | |
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
|
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
|
-
+
|
[self release];
@throw e;
}
return self;
}
- initWithFileName: (OFString *)fileName
- (instancetype)initWithFileName: (OFString *)fileName
{
self = [super init];
@try {
_fileName = [fileName copy];
_type = OF_TAR_ARCHIVE_ENTRY_TYPE_FILE;
_mode = 0644;
|
︙ | | |
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
|
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
|
-
+
-
+
|
[_targetFileName release];
[_owner release];
[_group release];
[super dealloc];
}
- copy
- (id)copy
{
return [self retain];
}
- mutableCopy
- (id)mutableCopy
{
OFTarArchiveEntry *copy = [[OFMutableTarArchiveEntry alloc]
initWithFileName: _fileName];
@try {
copy->_mode = _mode;
copy->_size = _size;
|
︙ | | |
Modified src/OFThread.h
from [2fd0087f7e]
to [42f39cebaf].
︙ | | |
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
|
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
|
-
+
|
# ifdef OF_HAVE_BLOCKS
/*!
* @brief Initializes an already allocated thread with the specified block.
*
* @param threadBlock A block which is executed by the thread
* @return An initialized OFThread.
*/
- initWithThreadBlock: (of_thread_block_t)threadBlock;
- (instancetype)initWithThreadBlock: (of_thread_block_t)threadBlock;
# endif
/*!
* @brief The main routine of the thread. You need to reimplement this!
*
* @return The object the join method should return when called for this thread
*/
|
︙ | | |
266
267
268
269
270
271
272
273
274
275
276
277
|
266
267
268
269
270
271
272
273
274
275
276
277
|
-
+
|
*
* @note This has to be set before the thread is started!
*
* @param stackSize The stack size for the thread
*/
- (void)setStackSize: (size_t)stackSize;
#else
- init OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
#endif
@end
OF_ASSUME_NONNULL_END
|
Modified src/OFThread.m
from [41a9132f9a]
to [2b6b7f737c].
︙ | | |
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
|
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
|
-
+
-
+
|
mainThread->_thread = of_thread_current();
if (!of_tlskey_set(threadSelfKey, mainThread))
@throw [OFInitializationFailedException
exceptionWithClass: self];
}
- init
- (instancetype)init
{
self = [super init];
@try {
if (!of_thread_attr_init(&_attr))
@throw [OFInitializationFailedException
exceptionWithClass: [self class]];
} @catch (id e) {
[self release];
@throw e;
}
return self;
}
# ifdef OF_HAVE_BLOCKS
- initWithThreadBlock: (of_thread_block_t)threadBlock
- (instancetype)initWithThreadBlock: (of_thread_block_t)threadBlock
{
self = [self init];
@try {
_threadBlock = [threadBlock copy];
} @catch (id e) {
[self release];
|
︙ | | |
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
|
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
|
-
+
|
@throw [OFThreadJoinFailedException exceptionWithThread: self];
_running = OF_THREAD_NOT_RUNNING;
return _returnValue;
}
- copy
- (id)copy
{
return [self retain];
}
- (OFRunLoop *)runLoop
{
# if defined(OF_HAVE_ATOMIC_OPS) && !defined(__clang_analyzer__)
|
︙ | | |
456
457
458
459
460
461
462
463
464
465
466
467
468
|
456
457
458
459
460
461
462
463
464
465
466
467
468
|
-
+
|
# ifdef OF_HAVE_BLOCKS
[_threadBlock release];
# endif
[super dealloc];
}
#else
- init
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
#endif
@end
|
Modified src/OFThreadPool.h
from [5da8ae2890]
to [eee48469e5].
︙ | | |
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
-
+
|
/*!
* @brief Initializes an already allocated OFThreadPool with the specified
* number of threads.
*
* @param size The number of threads for the pool
* @return An initialized OFThreadPool with the specified number of threads
*/
- initWithSize: (size_t)size OF_DESIGNATED_INITIALIZER;
- (instancetype)initWithSize: (size_t)size OF_DESIGNATED_INITIALIZER;
/*!
* @brief Execute the specified selector on the specified target with the
* specified object as soon as a thread is ready.
*
* @param target The target on which to perform the selector
* @param selector The selector to perform on the target
|
︙ | | |
Modified src/OFThreadPool.m
from [2aa1978876]
to [aa9af4f131].
︙ | | |
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
|
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
|
-
-
-
+
+
+
-
+
-
-
-
+
+
+
-
+
|
SEL _selector;
id _object;
#ifdef OF_HAVE_BLOCKS
of_thread_pool_block_t _block;
#endif
}
- initWithTarget: (id)target
selector: (SEL)selector
object: (id)object;
- (instancetype)initWithTarget: (id)target
selector: (SEL)selector
object: (id)object;
#ifdef OF_HAVE_BLOCKS
- initWithBlock: (of_thread_pool_block_t)block;
- (instancetype)initWithBlock: (of_thread_pool_block_t)block;
#endif
- (void)perform;
@end
@implementation OFThreadPoolJob
- initWithTarget: (id)target
selector: (SEL)selector
object: (id)object
- (instancetype)initWithTarget: (id)target
selector: (SEL)selector
object: (id)object
{
self = [super init];
@try {
_target = [target retain];
_selector = selector;
_object = [object retain];
} @catch (id e) {
[self release];
@throw e;
}
return self;
}
#ifdef OF_HAVE_BLOCKS
- initWithBlock: (of_thread_pool_block_t)block
- (instancetype)initWithBlock: (of_thread_pool_block_t)block
{
self = [super init];
@try {
_block = [block copy];
} @catch (id e) {
[self release];
|
︙ | | |
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
|
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
|
-
+
-
+
|
OFCondition *_queueCondition, *_countCondition;
@public
volatile bool _terminate;
volatile int *_doneCount;
}
+ (instancetype)threadWithThreadPool: (OFThreadPool *)threadPool;
- initWithThreadPool: (OFThreadPool *)threadPool;
- (instancetype)initWithThreadPool: (OFThreadPool *)threadPool;
@end
@implementation OFThreadPoolThread
+ (instancetype)threadWithThreadPool: (OFThreadPool *)threadPool
{
return [[[self alloc] initWithThreadPool: threadPool] autorelease];
}
- initWithThreadPool: (OFThreadPool *)threadPool
- (instancetype)initWithThreadPool: (OFThreadPool *)threadPool
{
self = [super init];
@try {
_queue = [threadPool->_queue retain];
_queueCondition = [threadPool->_queueCondition retain];
_countCondition = [threadPool->_countCondition retain];
|
︙ | | |
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
|
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
|
-
+
-
+
|
}
+ (instancetype)threadPoolWithSize: (size_t)size
{
return [[[self alloc] initWithSize: size] autorelease];
}
- init
- (instancetype)init
{
return [self initWithSize: [OFSystemInfo numberOfCPUs]];
}
- initWithSize: (size_t)size
- (instancetype)initWithSize: (size_t)size
{
self = [super init];
@try {
_size = size;
_threads = [[OFMutableArray alloc] init];
_queue = [[OFList alloc] init];
|
︙ | | |
Modified src/OFTimer.h
from [5422596386]
to [47d5c258ad].
︙ | | |
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
|
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
|
-
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
|
* @return A new, autoreleased timer
*/
+ (instancetype)timerWithTimeInterval: (of_time_interval_t)timeInterval
repeats: (bool)repeats
block: (of_timer_block_t)block;
#endif
- init OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
/*!
* @brief Initializes an already allocated timer with the specified time
* interval.
*
* @param fireDate The date at which the timer should fire
* @param interval The time interval after which to repeat the timer, if it is
* a repeating timer
* @param target The target on which to call the selector
* @param selector The selector to call on the target
* @param repeats Whether the timer repeats after it has been executed
* @return An initialized timer
*/
- initWithFireDate: (OFDate *)fireDate
interval: (of_time_interval_t)interval
target: (id)target
selector: (SEL)selector
repeats: (bool)repeats;
- (instancetype)initWithFireDate: (OFDate *)fireDate
interval: (of_time_interval_t)interval
target: (id)target
selector: (SEL)selector
repeats: (bool)repeats;
/*!
* @brief Initializes an already allocated timer with the specified time
* interval.
*
* @param fireDate The date at which the timer should fire
* @param interval The time interval after which to repeat the timer, if it is
* a repeating timer
* @param target The target on which to call the selector
* @param selector The selector to call on the target
* @param object An object to pass when calling the selector on the target
* @param repeats Whether the timer repeats after it has been executed
* @return An initialized timer
*/
- initWithFireDate: (OFDate *)fireDate
interval: (of_time_interval_t)interval
target: (id)target
selector: (SEL)selector
object: (nullable id)object
repeats: (bool)repeats;
- (instancetype)initWithFireDate: (OFDate *)fireDate
interval: (of_time_interval_t)interval
target: (id)target
selector: (SEL)selector
object: (nullable id)object
repeats: (bool)repeats;
/*!
* @brief Initializes an already allocated timer with the specified time
* interval.
*
* @param fireDate The date at which the timer should fire
* @param interval The time interval after which to repeat the timer, if it is
* a repeating timer
* @param target The target on which to call the selector
* @param selector The selector to call on the target
* @param object1 The first object to pass when calling the selector on the
* target
* @param object2 The second object to pass when calling the selector on the
* target
* @param repeats Whether the timer repeats after it has been executed
* @return An initialized timer
*/
- initWithFireDate: (OFDate *)fireDate
interval: (of_time_interval_t)interval
target: (id)target
selector: (SEL)selector
object: (nullable id)object1
object: (nullable id)object2
repeats: (bool)repeats;
- (instancetype)initWithFireDate: (OFDate *)fireDate
interval: (of_time_interval_t)interval
target: (id)target
selector: (SEL)selector
object: (nullable id)object1
object: (nullable id)object2
repeats: (bool)repeats;
/*!
* @brief Initializes an already allocated timer with the specified time
* interval.
*
* @param fireDate The date at which the timer should fire
* @param interval The time interval after which to repeat the timer, if it is
* a repeating timer
* @param target The target on which to call the selector
* @param selector The selector to call on the target
* @param object1 The first object to pass when calling the selector on the
* target
* @param object2 The second object to pass when calling the selector on the
* target
* @param object3 The third object to pass when calling the selector on the
* target
* @param repeats Whether the timer repeats after it has been executed
* @return An initialized timer
*/
- initWithFireDate: (OFDate *)fireDate
interval: (of_time_interval_t)interval
target: (id)target
selector: (SEL)selector
object: (nullable id)object1
object: (nullable id)object2
object: (nullable id)object3
repeats: (bool)repeats;
- (instancetype)initWithFireDate: (OFDate *)fireDate
interval: (of_time_interval_t)interval
target: (id)target
selector: (SEL)selector
object: (nullable id)object1
object: (nullable id)object2
object: (nullable id)object3
repeats: (bool)repeats;
/*!
* @brief Initializes an already allocated timer with the specified time
* interval.
*
* @param fireDate The date at which the timer should fire
* @param interval The time interval after which to repeat the timer, if it is
|
︙ | | |
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
|
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
|
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
|
* @param object3 The third object to pass when calling the selector on the
* target
* @param object4 The fourth object to pass when calling the selector on the
* target
* @param repeats Whether the timer repeats after it has been executed
* @return An initialized timer
*/
- initWithFireDate: (OFDate *)fireDate
interval: (of_time_interval_t)interval
target: (id)target
selector: (SEL)selector
object: (nullable id)object1
object: (nullable id)object2
object: (nullable id)object3
object: (nullable id)object4
repeats: (bool)repeats;
- (instancetype)initWithFireDate: (OFDate *)fireDate
interval: (of_time_interval_t)interval
target: (id)target
selector: (SEL)selector
object: (nullable id)object1
object: (nullable id)object2
object: (nullable id)object3
object: (nullable id)object4
repeats: (bool)repeats;
#ifdef OF_HAVE_BLOCKS
/*!
* @brief Initializes an already allocated timer with the specified time
* interval.
*
* @param fireDate The date at which the timer should fire
* @param interval The time interval after which to repeat the timer, if it is
* a repeating timer
* @param repeats Whether the timer repeats after it has been executed
* @param block The block to invoke when the timer fires
* @return An initialized timer
*/
- initWithFireDate: (OFDate *)fireDate
interval: (of_time_interval_t)interval
repeats: (bool)repeats
block: (of_timer_block_t)block;
- (instancetype)initWithFireDate: (OFDate *)fireDate
interval: (of_time_interval_t)interval
repeats: (bool)repeats
block: (of_timer_block_t)block;
#endif
/*!
* @brief Fires the timer, meaning it will execute the specified selector on the
* target.
*/
- (void)fire;
|
︙ | | |
Modified src/OFTimer.m
from [c9ab85ab8c]
to [a3b64a1457].
︙ | | |
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
|
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
|
-
+
|
[timer retain];
objc_autoreleasePoolPop(pool);
return [timer autorelease];
}
#endif
- init
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
- (instancetype)of_initWithFireDate: (OFDate *)fireDate
interval: (of_time_interval_t)interval
target: (id)target
|
︙ | | |
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
|
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
|
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
-
-
+
+
+
+
|
[self release];
@throw e;
}
return self;
}
- initWithFireDate: (OFDate *)fireDate
interval: (of_time_interval_t)interval
target: (id)target
selector: (SEL)selector
repeats: (bool)repeats
- (instancetype)initWithFireDate: (OFDate *)fireDate
interval: (of_time_interval_t)interval
target: (id)target
selector: (SEL)selector
repeats: (bool)repeats
{
return [self of_initWithFireDate: fireDate
interval: interval
target: target
selector: selector
object: nil
object: nil
object: nil
object: nil
arguments: 0
repeats: repeats];
}
- initWithFireDate: (OFDate *)fireDate
interval: (of_time_interval_t)interval
target: (id)target
selector: (SEL)selector
object: (id)object
repeats: (bool)repeats
- (instancetype)initWithFireDate: (OFDate *)fireDate
interval: (of_time_interval_t)interval
target: (id)target
selector: (SEL)selector
object: (id)object
repeats: (bool)repeats
{
return [self of_initWithFireDate: fireDate
interval: interval
target: target
selector: selector
object: object
object: nil
object: nil
object: nil
arguments: 1
repeats: repeats];
}
- initWithFireDate: (OFDate *)fireDate
interval: (of_time_interval_t)interval
target: (id)target
selector: (SEL)selector
object: (id)object1
object: (id)object2
repeats: (bool)repeats
- (instancetype)initWithFireDate: (OFDate *)fireDate
interval: (of_time_interval_t)interval
target: (id)target
selector: (SEL)selector
object: (id)object1
object: (id)object2
repeats: (bool)repeats
{
return [self of_initWithFireDate: fireDate
interval: interval
target: target
selector: selector
object: object1
object: object2
object: nil
object: nil
arguments: 2
repeats: repeats];
}
- initWithFireDate: (OFDate *)fireDate
interval: (of_time_interval_t)interval
target: (id)target
selector: (SEL)selector
object: (id)object1
object: (id)object2
object: (id)object3
repeats: (bool)repeats
- (instancetype)initWithFireDate: (OFDate *)fireDate
interval: (of_time_interval_t)interval
target: (id)target
selector: (SEL)selector
object: (id)object1
object: (id)object2
object: (id)object3
repeats: (bool)repeats
{
return [self of_initWithFireDate: fireDate
interval: interval
target: target
selector: selector
object: object1
object: object2
object: object3
object: nil
arguments: 3
repeats: repeats];
}
- initWithFireDate: (OFDate *)fireDate
interval: (of_time_interval_t)interval
target: (id)target
selector: (SEL)selector
object: (id)object1
object: (id)object2
object: (id)object3
object: (id)object4
repeats: (bool)repeats
- (instancetype)initWithFireDate: (OFDate *)fireDate
interval: (of_time_interval_t)interval
target: (id)target
selector: (SEL)selector
object: (id)object1
object: (id)object2
object: (id)object3
object: (id)object4
repeats: (bool)repeats
{
return [self of_initWithFireDate: fireDate
interval: interval
target: target
selector: selector
object: object1
object: object2
object: object3
object: object4
arguments: 4
repeats: repeats];
}
#ifdef OF_HAVE_BLOCKS
- initWithFireDate: (OFDate *)fireDate
interval: (of_time_interval_t)interval
repeats: (bool)repeats
block: (of_timer_block_t)block
- (instancetype)initWithFireDate: (OFDate *)fireDate
interval: (of_time_interval_t)interval
repeats: (bool)repeats
block: (of_timer_block_t)block
{
self = [super init];
@try {
_fireDate = [fireDate retain];
_interval = interval;
_repeats = repeats;
|
︙ | | |
Modified src/OFTriple.h
from [7b5e9acbc5]
to [5e36a777ce].
︙ | | |
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
-
-
-
+
+
+
|
* @brief Initializes an already allocated OFTriple with the specified objects.
*
* @param firstObject The first object for the triple
* @param secondObject The second object for the triple
* @param thirdObject The second object for the triple
* @return An initialized OFTriple
*/
- initWithFirstObject: (nullable FirstType)firstObject
secondObject: (nullable SecondType)secondObject
thirdObject: (nullable ThirdType)thirdObject;
- (instancetype)initWithFirstObject: (nullable FirstType)firstObject
secondObject: (nullable SecondType)secondObject
thirdObject: (nullable ThirdType)thirdObject;
#if !defined(OF_HAVE_GENERICS) && !defined(DOXYGEN)
# undef FirstType
# undef SecondType
# undef ThirdType
#endif
@end
OF_ASSUME_NONNULL_END
#import "OFMutableTriple.h"
|
Modified src/OFTriple.m
from [8c78490503]
to [2e7a2cddf4].
︙ | | |
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
|
-
-
-
+
+
+
|
thirdObject: (id)thirdObject
{
return [[[self alloc] initWithFirstObject: firstObject
secondObject: secondObject
thirdObject: thirdObject] autorelease];
}
- initWithFirstObject: (id)firstObject
secondObject: (id)secondObject
thirdObject: (id)thirdObject
- (instancetype)initWithFirstObject: (id)firstObject
secondObject: (id)secondObject
thirdObject: (id)thirdObject
{
self = [super init];
@try {
_firstObject = [firstObject retain];
_secondObject = [secondObject retain];
_thirdObject = [thirdObject retain];
|
︙ | | |
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
|
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
|
-
+
-
+
|
OF_HASH_ADD_HASH(hash, [_thirdObject hash]);
OF_HASH_FINALIZE(hash);
return hash;
}
- copy
- (id)copy
{
return [self retain];
}
- mutableCopy
- (id)mutableCopy
{
return [[OFMutableTriple alloc] initWithFirstObject: _firstObject
secondObject: _secondObject
thirdObject: _thirdObject];
}
- (OFString *)description
{
return [OFString stringWithFormat: @"<<%@, %@, %@>>",
_firstObject, _secondObject,
_thirdObject];
}
@end
|
Modified src/OFUDPSocket.m
from [35a4b455a8]
to [8a3b636da1].
︙ | | |
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
|
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
|
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
+
+
+
+
|
# ifdef OF_HAVE_BLOCKS
of_udp_socket_async_resolve_block_t _block;
# endif
of_udp_socket_address_t _address;
id _exception;
}
- initWithSourceThread: (OFThread *)sourceThread
host: (OFString *)host
port: (uint16_t)port
target: (id)target
selector: (SEL)selector
context: (id)context;
- (instancetype)initWithSourceThread: (OFThread *)sourceThread
host: (OFString *)host
port: (uint16_t)port
target: (id)target
selector: (SEL)selector
context: (id)context;
# ifdef OF_HAVE_BLOCKS
- initWithSourceThread: (OFThread *)sourceThread
host: (OFString *)host
port: (uint16_t)port
block: (of_udp_socket_async_resolve_block_t)block;
- (instancetype)initWithSourceThread: (OFThread *)sourceThread
host: (OFString *)host
port: (uint16_t)port
block: (of_udp_socket_async_resolve_block_t)
block;
# endif
@end
@implementation OFUDPSocket_ResolveThread
- initWithSourceThread: (OFThread *)sourceThread
host: (OFString *)host
port: (uint16_t)port
target: (id)target
selector: (SEL)selector
context: (id)context
- (instancetype)initWithSourceThread: (OFThread *)sourceThread
host: (OFString *)host
port: (uint16_t)port
target: (id)target
selector: (SEL)selector
context: (id)context
{
self = [super init];
@try {
_sourceThread = [sourceThread retain];
_host = [host retain];
_port = port;
_target = [target retain];
_selector = selector;
_context = [context retain];
} @catch (id e) {
[self release];
@throw e;
}
return self;
}
# ifdef OF_HAVE_BLOCKS
- initWithSourceThread: (OFThread *)sourceThread
host: (OFString *)host
port: (uint16_t)port
block: (of_udp_socket_async_resolve_block_t)block
- (instancetype)initWithSourceThread: (OFThread *)sourceThread
host: (OFString *)host
port: (uint16_t)port
block: (of_udp_socket_async_resolve_block_t)block
{
self = [super init];
@try {
_sourceThread = [sourceThread retain];
_host = [host copy];
_port = port;
|
︙ | | |
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
|
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
|
-
+
-
+
|
andPort: (uint16_t *)port
forAddress: (of_udp_socket_address_t *)address
{
of_address_to_string_and_port(
(struct sockaddr *)&address->address, address->length, host, port);
}
- init
- (instancetype)init
{
self = [super init];
_socket = INVALID_SOCKET;
return self;
}
- (void)dealloc
{
if (_socket != INVALID_SOCKET)
[self close];
[super dealloc];
}
- copy
- (id)copy
{
return [self retain];
}
- (uint16_t)bindToHost: (OFString *)host
port: (uint16_t)port
{
|
︙ | | |
Modified src/OFURL.h
from [1961d082fb]
to [c55211ca68].
︙ | | |
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
133
134
135
136
137
138
139
140
141
|
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
133
134
135
136
137
138
139
140
141
|
-
+
-
+
-
-
+
+
|
* @brief Creates a new URL with the specified local file path.
*
* @param path The local file path
* @return A new, autoreleased OFURL
*/
+ (instancetype)fileURLWithPath: (OFString *)path;
- init OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
/*!
* @brief Initializes an already allocated OFURL with the specified string.
*
* @param string A string describing a URL
* @return An initialized OFURL
*/
- initWithString: (OFString *)string;
- (instancetype)initWithString: (OFString *)string;
/*!
* @brief Initializes an already allocated OFURL with the specified string and
* relative URL.
*
* @param string A string describing a URL
* @param URL A URL to which the string is relative
* @return An initialized OFURL
*/
- initWithString: (OFString *)string
relativeToURL: (OFURL *)URL;
- (instancetype)initWithString: (OFString *)string
relativeToURL: (OFURL *)URL;
/*!
* @brief Returns the URL as a string.
*
* @return The URL as a string
*/
- (OFString *)string;
@end
OF_ASSUME_NONNULL_END
#import "OFMutableURL.h"
|
Modified src/OFURL.m
from [2082375f0b]
to [bc22950fc0].
︙ | | |
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
|
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
|
-
+
-
+
|
[URL makeImmutable];
objc_autoreleasePoolPop(pool);
return URL;
}
- init
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
- (instancetype)of_init
{
return [super init];
}
- initWithString: (OFString *)string
- (instancetype)initWithString: (OFString *)string
{
char *UTF8String, *UTF8String2 = NULL;
self = [super init];
@try {
void *pool = objc_autoreleasePoolPush();
|
︙ | | |
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
|
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
|
-
-
+
+
|
} @finally {
free(UTF8String2);
}
return self;
}
- initWithString: (OFString *)string
relativeToURL: (OFURL *)URL
- (instancetype)initWithString: (OFString *)string
relativeToURL: (OFURL *)URL
{
char *UTF8String, *UTF8String2 = NULL;
if ([string containsString: @"://"])
return [self initWithString: string];
self = [super init];
|
︙ | | |
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
|
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
|
-
+
|
} @finally {
free(UTF8String2);
}
return self;
}
- initWithSerialization: (OFXMLElement *)element
- (instancetype)initWithSerialization: (OFXMLElement *)element
{
@try {
void *pool = objc_autoreleasePoolPush();
if (![[element name] isEqual: [self className]] ||
![[element namespace] isEqual: OF_SERIALIZATION_NS])
@throw [OFInvalidArgumentException exception];
|
︙ | | |
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
|
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
|
-
+
-
+
|
}
- (OFString *)fragment
{
return _fragment;
}
- copy
- (id)copy
{
return [self retain];
}
- mutableCopy
- (id)mutableCopy
{
OFMutableURL *copy = [[OFMutableURL alloc] init];
@try {
[copy setScheme: _scheme];
[copy setHost: _host];
[copy setPort: _port];
|
︙ | | |
Modified src/OFXMLAttribute.h
from [30a9d4482b]
to [1c90397046].
︙ | | |
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
|
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
|
-
-
+
+
-
-
-
+
+
+
-
+
|
/*!
* @brief Initializes an already allocated OFXMLAttribute.
*
* @param name The name of the attribute
* @param stringValue The string value of the attribute
* @return An initialized OFXMLAttribute with the specified parameters
*/
- initWithName: (OFString *)name
stringValue: (OFString *)stringValue;
- (instancetype)initWithName: (OFString *)name
stringValue: (OFString *)stringValue;
/*!
* @brief Initializes an already allocated OFXMLAttribute.
*
* @param name The name of the attribute
* @param namespace_ The namespace of the attribute
* @param stringValue The string value of the attribute
* @return An initialized OFXMLAttribute with the specified parameters
*/
- initWithName: (OFString *)name
namespace: (nullable OFString *)namespace_
stringValue: (OFString *)stringValue;
- (instancetype)initWithName: (OFString *)name
namespace: (nullable OFString *)namespace_
stringValue: (OFString *)stringValue;
- initWithSerialization: (OFXMLElement *)element;
- (instancetype)initWithSerialization: (OFXMLElement *)element;
@end
OF_ASSUME_NONNULL_END
|
Modified src/OFXMLAttribute.m
from [464c2003f8]
to [3298ffe82d].
︙ | | |
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
|
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
|
-
-
+
+
-
-
-
+
+
+
-
+
|
+ (instancetype)attributeWithName: (OFString *)name
stringValue: (OFString *)stringValue
{
return [[[self alloc] initWithName: name
stringValue: stringValue] autorelease];
}
- initWithName: (OFString *)name
stringValue: (OFString *)stringValue
- (instancetype)initWithName: (OFString *)name
stringValue: (OFString *)stringValue
{
return [self initWithName: name
namespace: nil
stringValue: stringValue];
}
- initWithName: (OFString *)name
namespace: (OFString *)namespace
stringValue: (OFString *)stringValue
- (instancetype)initWithName: (OFString *)name
namespace: (OFString *)namespace
stringValue: (OFString *)stringValue
{
self = [super of_init];
@try {
_name = [name copy];
_namespace = [namespace copy];
_stringValue = [stringValue copy];
} @catch (id e) {
[self release];
@throw e;
}
return self;
}
- initWithSerialization: (OFXMLElement *)element
- (instancetype)initWithSerialization: (OFXMLElement *)element
{
self = [super of_init];
@try {
void *pool = objc_autoreleasePoolPush();
if (![[element name] isEqual: [self className]] ||
|
︙ | | |
Modified src/OFXMLCDATA.h
from [180a9b9155]
to [6e6e36905e].
︙ | | |
38
39
40
41
42
43
44
45
46
47
48
49
50
|
38
39
40
41
42
43
44
45
46
47
48
49
50
|
-
+
-
+
|
/*!
* @brief Initializes an already allocated OFXMLCDATA with the specified string.
*
* @param string The string value for the CDATA
* @return An initialized OFXMLCDATA
*/
- initWithString: (OFString *)string;
- (instancetype)initWithString: (OFString *)string;
- initWithSerialization: (OFXMLElement *)element;
- (instancetype)initWithSerialization: (OFXMLElement *)element;
@end
OF_ASSUME_NONNULL_END
|
Modified src/OFXMLCDATA.m
from [c06dfedaeb]
to [ad2bdf844e].
︙ | | |
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
|
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
|
-
+
-
+
|
@implementation OFXMLCDATA
+ (instancetype)CDATAWithString: (OFString *)string
{
return [[[self alloc] initWithString: string] autorelease];
}
- initWithString: (OFString *)string
- (instancetype)initWithString: (OFString *)string
{
self = [super of_init];
@try {
_CDATA = [string copy];
} @catch (id e) {
[self release];
@throw e;
}
return self;
}
- initWithSerialization: (OFXMLElement *)element
- (instancetype)initWithSerialization: (OFXMLElement *)element
{
self = [super of_init];
@try {
void *pool = objc_autoreleasePoolPush();
if (![[element name] isEqual: [self className]] ||
|
︙ | | |
Modified src/OFXMLCharacters.h
from [03693d3314]
to [cda4ae2199].
︙ | | |
39
40
41
42
43
44
45
46
47
48
49
50
51
|
39
40
41
42
43
44
45
46
47
48
49
50
51
|
-
+
-
+
|
/*!
* @brief Initializes an already allocated OFXMLCharacters with the specified
* string.
*
* @param string The string value for the characters
* @return An initialized OFXMLCharacters
*/
- initWithString: (OFString *)string;
- (instancetype)initWithString: (OFString *)string;
- initWithSerialization: (OFXMLElement *)element;
- (instancetype)initWithSerialization: (OFXMLElement *)element;
@end
OF_ASSUME_NONNULL_END
|
Modified src/OFXMLCharacters.m
from [366dd6ac23]
to [7fa5226ce0].
︙ | | |
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
|
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
|
-
+
-
+
|
@implementation OFXMLCharacters
+ (instancetype)charactersWithString: (OFString *)string
{
return [[[self alloc] initWithString: string] autorelease];
}
- initWithString: (OFString *)string
- (instancetype)initWithString: (OFString *)string
{
self = [super of_init];
@try {
_characters = [string copy];
} @catch (id e) {
[self release];
@throw e;
}
return self;
}
- initWithSerialization: (OFXMLElement *)element
- (instancetype)initWithSerialization: (OFXMLElement *)element
{
self = [super of_init];
@try {
void *pool = objc_autoreleasePoolPush();
if (![[element name] isEqual: [self className]] ||
|
︙ | | |
Modified src/OFXMLComment.h
from [a0ed4a3c91]
to [955209304a].
︙ | | |
39
40
41
42
43
44
45
46
47
48
49
50
51
|
39
40
41
42
43
44
45
46
47
48
49
50
51
|
-
+
-
+
|
/*!
* @brief Initializes an already allocated OFXMLComment with the specified
* string.
*
* @param string The string for the comment
* @return An initialized OFXMLComment
*/
- initWithString: (OFString *)string;
- (instancetype)initWithString: (OFString *)string;
- initWithSerialization: (OFXMLElement *)element;
- (instancetype)initWithSerialization: (OFXMLElement *)element;
@end
OF_ASSUME_NONNULL_END
|
Modified src/OFXMLComment.m
from [f4e7bbcd6f]
to [cedcad6c16].
︙ | | |
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
|
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
|
-
+
-
+
|
@implementation OFXMLComment
+ (instancetype)commentWithString: (OFString *)string
{
return [[[self alloc] initWithString: string] autorelease];
}
- initWithString: (OFString *)string
- (instancetype)initWithString: (OFString *)string
{
self = [super of_init];
@try {
_comment = [string copy];
} @catch (id e) {
[self release];
@throw e;
}
return self;
}
- initWithSerialization: (OFXMLElement *)element
- (instancetype)initWithSerialization: (OFXMLElement *)element
{
self = [super of_init];
@try {
void *pool = objc_autoreleasePoolPush();
if (![[element name] isEqual: [self className]] ||
|
︙ | | |
Modified src/OFXMLElement.h
from [4cdf8539f9]
to [0e0aeff41f].
︙ | | |
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
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
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
|
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
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
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
|
-
+
-
+
-
-
+
+
-
-
+
+
-
-
-
+
+
+
-
+
-
+
-
+
-
+
|
* @param path The path to the file
* @return A new autoreleased OFXMLElement with the contents of the specified
* file
*/
+ (instancetype)elementWithFile: (OFString *)path;
#endif
- init OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
/*!
* @brief Initializes an already allocated OFXMLElement with the specified name.
*
* @param name The name for the element
* @return An initialized OFXMLElement with the specified element name
*/
- initWithName: (OFString *)name;
- (instancetype)initWithName: (OFString *)name;
/*!
* @brief Initializes an already allocated OFXMLElement with the specified name
* and string value.
*
* @param name The name for the element
* @param stringValue The value for the element
* @return An initialized OFXMLElement with the specified element name and
* value
*/
- initWithName: (OFString *)name
stringValue: (nullable OFString *)stringValue;
- (instancetype)initWithName: (OFString *)name
stringValue: (nullable OFString *)stringValue;
/*!
* @brief Initializes an already allocated OFXMLElement with the specified name
* and namespace.
*
* @param name The name for the element
* @param namespace_ The namespace for the element
* @return An initialized OFXMLElement with the specified element name and
* namespace
*/
- initWithName: (OFString *)name
namespace: (nullable OFString *)namespace_;
- (instancetype)initWithName: (OFString *)name
namespace: (nullable OFString *)namespace_;
/*!
* @brief Initializes an already allocated OFXMLElement with the specified name,
* namespace and value.
*
* @param name The name for the element
* @param namespace_ The namespace for the element
* @param stringValue The value for the element
* @return An initialized OFXMLElement with the specified element name,
* namespace and value
*/
- initWithName: (OFString *)name
namespace: (nullable OFString *)namespace_
stringValue: (nullable OFString *)stringValue;
- (instancetype)initWithName: (OFString *)name
namespace: (nullable OFString *)namespace_
stringValue: (nullable OFString *)stringValue;
/*!
* @brief Initializes an already allocated OFXMLElement with the specified
* element.
*
* @param element An OFXMLElement to initialize the OFXMLElement with
* @return A new autoreleased OFXMLElement with the contents of the specified
* element
*/
- initWithElement: (OFXMLElement *)element;
- (instancetype)initWithElement: (OFXMLElement *)element;
/*!
* @brief Parses the string and initializes an already allocated OFXMLElement
* with it.
*
* @param string The string to parse
* @return An initialized OFXMLElement with the contents of the string
*/
- initWithXMLString: (OFString *)string;
- (instancetype)initWithXMLString: (OFString *)string;
#ifdef OF_HAVE_FILES
/*!
* @brief Parses the specified file and initializes an already allocated
* OFXMLElement with it.
*
* @param path The path to the file
* @return An initialized OFXMLElement with the contents of the specified file
*/
- initWithFile: (OFString *)path;
- (instancetype)initWithFile: (OFString *)path;
#endif
- initWithSerialization: (OFXMLElement *)element;
- (instancetype)initWithSerialization: (OFXMLElement *)element;
/*!
* @brief Sets a prefix for a namespace.
*
* @param prefix The prefix for the namespace
* @param namespace_ The namespace for which the prefix is set
*/
|
︙ | | |
Modified src/OFXMLElement.m
from [28440d417d]
to [ac132aa128].
︙ | | |
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
|
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
|
-
+
-
+
-
-
+
+
-
-
+
+
-
-
-
+
+
+
|
#ifdef OF_HAVE_FILES
+ (instancetype)elementWithFile: (OFString *)path
{
return [[[self alloc] initWithFile: path] autorelease];
}
#endif
- init
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
- initWithName: (OFString *)name
- (instancetype)initWithName: (OFString *)name
{
return [self initWithName: name
namespace: nil
stringValue: nil];
}
- initWithName: (OFString *)name
stringValue: (OFString *)stringValue
- (instancetype)initWithName: (OFString *)name
stringValue: (OFString *)stringValue
{
return [self initWithName: name
namespace: nil
stringValue: stringValue];
}
- initWithName: (OFString *)name
namespace: (OFString *)namespace
- (instancetype)initWithName: (OFString *)name
namespace: (OFString *)namespace
{
return [self initWithName: name
namespace: namespace
stringValue: nil];
}
- initWithName: (OFString *)name
namespace: (OFString *)namespace
stringValue: (OFString *)stringValue
- (instancetype)initWithName: (OFString *)name
namespace: (OFString *)namespace
stringValue: (OFString *)stringValue
{
self = [super of_init];
@try {
if (name == nil)
@throw [OFInvalidArgumentException exception];
|
︙ | | |
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
|
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
|
-
+
|
[self release];
@throw e;
}
return self;
}
- initWithElement: (OFXMLElement *)element
- (instancetype)initWithElement: (OFXMLElement *)element
{
self = [super of_init];
@try {
if (element == nil)
@throw [OFInvalidArgumentException exception];
|
︙ | | |
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
|
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
|
-
+
|
[self release];
@throw e;
}
return self;
}
- initWithXMLString: (OFString *)string
- (instancetype)initWithXMLString: (OFString *)string
{
void *pool;
OFXMLParser *parser;
OFXMLElementBuilder *builder;
OFXMLElement_OFXMLElementBuilderDelegate *delegate;
[self release];
|
︙ | | |
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
|
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
|
-
+
|
objc_autoreleasePoolPop(pool);
return self;
}
#ifdef OF_HAVE_FILES
- initWithFile: (OFString *)path
- (instancetype)initWithFile: (OFString *)path
{
void *pool;
OFXMLParser *parser;
OFXMLElementBuilder *builder;
OFXMLElement_OFXMLElementBuilderDelegate *delegate;
[self release];
|
︙ | | |
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
|
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
|
-
+
|
objc_autoreleasePoolPop(pool);
return self;
}
#endif
- initWithSerialization: (OFXMLElement *)element
- (instancetype)initWithSerialization: (OFXMLElement *)element
{
self = [super of_init];
@try {
void *pool = objc_autoreleasePoolPush();
OFXMLElement *attributesElement, *namespacesElement;
OFXMLElement *childrenElement;
|
︙ | | |
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
|
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
|
-
+
|
OF_HASH_ADD_HASH(hash, [_children hash]);
OF_HASH_FINALIZE(hash);
return hash;
}
- copy
- (id)copy
{
return [[[self class] alloc] initWithElement: self];
}
@end
|
Modified src/OFXMLElementBuilder.m
from [8f1f7d2342]
to [a5fcb2b0c8].
︙ | | |
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
-
+
|
@synthesize delegate = _delegate;
+ (instancetype)elementBuilder
{
return [[[self alloc] init] autorelease];
}
- init
- (instancetype)init
{
self = [super init];
@try {
_stack = [[OFMutableArray alloc] init];
} @catch (id e) {
[self release];
|
︙ | | |
Modified src/OFXMLNode.h
from [96e3d4741c]
to [2716730e4a].
︙ | | |
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
-
-
+
+
|
/*!
* @class OFXMLNode OFXMLNode.h ObjFW/OFXMLNode.h
*
* @brief A class which stores an XML element.
*/
@interface OFXMLNode: OFObject <OFCopying, OFSerialization>
- init OF_UNAVAILABLE;
- initWithSerialization: (OFXMLElement *)element OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
- (instancetype)initWithSerialization: (OFXMLElement *)element OF_UNAVAILABLE;
/*!
* @brief Returns the contents of the receiver as a string value.
*
* @return A string with the string value
*/
- (OFString *)stringValue;
|
︙ | | |
Modified src/OFXMLNode.m
from [858e69720c]
to [1114a90ee4].
︙ | | |
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
-
+
-
+
|
@implementation OFXMLNode
- (instancetype)of_init
{
return [super init];
}
- init
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
- initWithSerialization: (OFXMLElement *)element
- (instancetype)initWithSerialization: (OFXMLElement *)element
{
OF_INVALID_INIT_METHOD
}
- (OFString *)stringValue
{
OF_UNRECOGNIZED_SELECTOR
|
︙ | | |
89
90
91
92
93
94
95
96
97
98
99
100
|
89
90
91
92
93
94
95
96
97
98
99
100
|
-
+
|
}
- (OFXMLElement *)XMLElementBySerializing
{
OF_UNRECOGNIZED_SELECTOR
}
- copy
- (id)copy
{
return [self retain];
}
@end
|
Modified src/OFXMLParser.m
from [c940e346a8]
to [b473f5b8df].
︙ | | |
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
|
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
|
-
+
|
}
+ (instancetype)parser
{
return [[[self alloc] init] autorelease];
}
- init
- (instancetype)init
{
self = [super init];
@try {
void *pool;
OFMutableDictionary *dict;
|
︙ | | |
Modified src/OFXMLProcessingInstructions.h
from [eaf57a08da]
to [6eacb4bea0].
︙ | | |
40
41
42
43
44
45
46
47
48
49
50
51
52
|
40
41
42
43
44
45
46
47
48
49
50
51
52
|
-
+
-
+
|
/*!
* @brief Initializes an already allocated OFXMLProcessingInstructions with the
* specified string.
*
* @param string The string for the processing instructions
* @return An initialized OFXMLProcessingInstructions
*/
- initWithString: (OFString *)string;
- (instancetype)initWithString: (OFString *)string;
- initWithSerialization: (OFXMLElement *)element;
- (instancetype)initWithSerialization: (OFXMLElement *)element;
@end
OF_ASSUME_NONNULL_END
|
Modified src/OFXMLProcessingInstructions.m
from [ef7508c1b7]
to [4edf794475].
︙ | | |
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
|
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
|
-
+
-
+
|
@implementation OFXMLProcessingInstructions
+ (instancetype)processingInstructionsWithString: (OFString *)string
{
return [[[self alloc] initWithString: string] autorelease];
}
- initWithString: (OFString *)string
- (instancetype)initWithString: (OFString *)string
{
self = [super of_init];
@try {
_processingInstructions = [string copy];
} @catch (id e) {
[self release];
@throw e;
}
return self;
}
- initWithSerialization: (OFXMLElement *)element
- (instancetype)initWithSerialization: (OFXMLElement *)element
{
self = [super of_init];
@try {
void *pool = objc_autoreleasePoolPush();
if (![[element name] isEqual: [self className]] ||
|
︙ | | |
Modified src/OFZIPArchive.h
from [8859760d81]
to [f753feb424].
︙ | | |
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
|
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
|
-
+
-
-
+
+
-
-
+
+
|
* archive.
* @return A new, autoreleased OFZIPArchive
*/
+ (instancetype)archiveWithPath: (OFString *)path
mode: (OFString *)mode;
#endif
- init OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
/*!
* @brief Initializes an already allocated OFZIPArchive object with the
* specified stream.
*
* @param stream A stream from which the ZIP archive will be read.
* For read and append mode, this needs to be an OFSeekableStream.
* @param mode The mode for the ZIP file. Valid modes are "r" for reading,
* "w" for creating a new file and "a" for appending to an existing
* archive.
* @return An initialized OFZIPArchive
*/
- initWithStream: (OF_KINDOF(OFStream *))stream
mode: (OFString *)mode OF_DESIGNATED_INITIALIZER;
- (instancetype)initWithStream: (OF_KINDOF(OFStream *))stream
mode: (OFString *)mode OF_DESIGNATED_INITIALIZER;
#ifdef OF_HAVE_FILES
/*!
* @brief Initializes an already allocated OFZIPArchive object with the
* specified file.
*
* @param path The path to the ZIP file
* @param mode The mode for the ZIP file. Valid modes are "r" for reading,
* "w" for creating a new file and "a" for appending to an existing
* archive.
* @return An initialized OFZIPArchive
*/
- initWithPath: (OFString *)path
mode: (OFString *)mode;
- (instancetype)initWithPath: (OFString *)path
mode: (OFString *)mode;
#endif
/*!
* @brief Returns the entries of the central directory of the archive as an
* array of objects of class @ref OFZIPArchiveEntry.
*
* The objects of the array have the same order as the entries in the central
|
︙ | | |
Modified src/OFZIPArchive.m
from [700f57a4db]
to [f82daa6eae].
︙ | | |
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
|
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
|
-
+
-
-
+
+
-
-
+
+
|
uint16_t _lastModifiedFileTime, _lastModifiedFileDate;
uint32_t _CRC32;
uint64_t _compressedSize, _uncompressedSize;
OFString *_fileName;
OFData *_extraField;
}
- initWithStream: (OFStream *)stream;
- (instancetype)initWithStream: (OFStream *)stream;
- (bool)matchesEntry: (OFZIPArchiveEntry *)entry;
@end
@interface OFZIPArchive_FileReadStream: OFStream
{
OFStream *_stream, *_decompressedStream;
OFZIPArchiveEntry *_entry;
uint64_t _toRead;
uint32_t _CRC32;
bool _atEndOfStream;
}
- initWithStream: (OFStream *)stream
entry: (OFZIPArchiveEntry *)entry;
- (instancetype)initWithStream: (OFStream *)stream
entry: (OFZIPArchiveEntry *)entry;
@end
@interface OFZIPArchive_FileWriteStream: OFStream
{
OFStream *_stream;
uint32_t _CRC32;
@public
int64_t _bytesWritten;
OFMutableZIPArchiveEntry *_entry;
}
- initWithStream: (OFStream *)stream
entry: (OFMutableZIPArchiveEntry *)entry;
- (instancetype)initWithStream: (OFStream *)stream
entry: (OFMutableZIPArchiveEntry *)entry;
@end
uint32_t
of_zip_archive_read_field32(const uint8_t **data, uint16_t *size)
{
uint32_t field = 0;
|
︙ | | |
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
|
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
|
-
+
-
-
+
+
|
mode: (OFString *)mode
{
return [[[self alloc] initWithPath: path
mode: mode] autorelease];
}
#endif
- init
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
- initWithStream: (OF_KINDOF(OFStream *))stream
mode: (OFString *)mode
- (instancetype)initWithStream: (OF_KINDOF(OFStream *))stream
mode: (OFString *)mode
{
self = [super init];
@try {
if ([mode isEqual: @"r"])
_mode = OF_ZIP_ARCHIVE_MODE_READ;
else if ([mode isEqual: @"w"])
|
︙ | | |
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
|
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
|
-
-
+
+
|
@throw e;
}
return self;
}
#ifdef OF_HAVE_FILES
- initWithPath: (OFString *)path
mode: (OFString *)mode
- (instancetype)initWithPath: (OFString *)path
mode: (OFString *)mode
{
OFFile *file;
if ([mode isEqual: @"a"])
file = [[OFFile alloc] initWithPath: path
mode: @"r+"];
else
|
︙ | | |
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
|
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
|
-
+
|
[_stream release];
_stream = nil;
}
@end
@implementation OFZIPArchive_LocalFileHeader
- initWithStream: (OFStream *)stream
- (instancetype)initWithStream: (OFStream *)stream
{
self = [super init];
@try {
void *pool = objc_autoreleasePoolPush();
OFMutableData *extraField = nil;
uint16_t fileNameLength, extraFieldLength;
|
︙ | | |
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
|
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
|
-
-
+
+
|
return false;
return true;
}
@end
@implementation OFZIPArchive_FileReadStream
- initWithStream: (OFStream *)stream
entry: (OFZIPArchiveEntry *)entry
- (instancetype)initWithStream: (OFStream *)stream
entry: (OFZIPArchiveEntry *)entry
{
self = [super init];
@try {
_stream = [stream retain];
switch ([entry compressionMethod]) {
|
︙ | | |
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
|
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
|
-
-
+
+
|
_stream = nil;
[super close];
}
@end
@implementation OFZIPArchive_FileWriteStream
- initWithStream: (OFStream *)stream
entry: (OFMutableZIPArchiveEntry *)entry
- (instancetype)initWithStream: (OFStream *)stream
entry: (OFMutableZIPArchiveEntry *)entry
{
self = [super init];
_stream = [stream retain];
_entry = [entry retain];
_CRC32 = ~0;
|
︙ | | |
Modified src/OFZIPArchiveEntry.h
from [54405d8038]
to [9d05415775].
︙ | | |
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
|
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
|
-
+
-
+
|
* @brief Creates a new OFZIPArchiveEntry with the specified file name.
*
* @param fileName The file name for the OFZIPArchiveEntry
* @return A new, autoreleased OFZIPArchiveEntry
*/
+ (instancetype)entryWithFileName: (OFString *)fileName;
- init OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
/*!
* @brief Initializes an already allocated OFZIPArchiveEntry with the specified
* file name.
*
* @param fileName The file name for the OFZIPArchiveEntry
* @return An initialized OFZIPArchiveEntry
*/
- initWithFileName: (OFString *)fileName;
- (instancetype)initWithFileName: (OFString *)fileName;
@end
#ifdef __cplusplus
extern "C" {
#endif
/*!
* @brief Converts the ZIP entry version to a string
|
︙ | | |
Modified src/OFZIPArchiveEntry.m
from [c8f541f60e]
to [a552090953].
︙ | | |
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
|
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
|
-
+
-
+
|
@implementation OFZIPArchiveEntry
+ (instancetype)entryWithFileName: (OFString *)fileName
{
return [[[self alloc] initWithFileName: fileName] autorelease];
}
- init
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
- initWithFileName: (OFString *)fileName
- (instancetype)initWithFileName: (OFString *)fileName
{
self = [super init];
@try {
void *pool = objc_autoreleasePoolPush();
if ([fileName UTF8StringLength] > UINT16_MAX)
|
︙ | | |
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
|
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
|
-
+
-
+
|
[_fileName release];
[_extraField release];
[_fileComment release];
[super dealloc];
}
- copy
- (id)copy
{
return [self retain];
}
- mutableCopy
- (id)mutableCopy
{
OFZIPArchiveEntry *copy =
[[OFMutableZIPArchiveEntry alloc] initWithFileName: _fileName];
@try {
copy->_versionMadeBy = _versionMadeBy;
copy->_minVersionNeeded = _minVersionNeeded;
|
︙ | | |
Modified src/bridge/NSArray_OFArray.h
from [fa0ba160b6]
to [fc39953ec6].
︙ | | |
21
22
23
24
25
26
27
28
29
30
31
|
21
22
23
24
25
26
27
28
29
30
31
|
-
+
|
NS_ASSUME_NONNULL_BEGIN
@interface NSArray_OFArray: NSArray
{
OFArray *_array;
}
- initWithOFArray: (OFArray *)array;
- (instancetype)initWithOFArray: (OFArray *)array;
@end
NS_ASSUME_NONNULL_END
|
Modified src/bridge/NSArray_OFArray.m
from [ab0fe4a97d]
to [92d6803c52].
︙ | | |
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
-
+
|
#import "NSArray_OFArray.h"
#import "OFArray.h"
#import "OFBridging.h"
#import "OFOutOfRangeException.h"
@implementation NSArray_OFArray
- initWithOFArray: (OFArray *)array
- (instancetype)initWithOFArray: (OFArray *)array
{
if ((self = [super init]) != nil) {
@try {
_array = [array retain];
} @catch (id e) {
return nil;
}
|
︙ | | |
Modified src/bridge/NSDictionary_OFDictionary.h
from [a63731835d]
to [bf71dfed62].
︙ | | |
21
22
23
24
25
26
27
28
29
30
31
|
21
22
23
24
25
26
27
28
29
30
31
|
-
+
|
NS_ASSUME_NONNULL_BEGIN
@interface NSDictionary_OFDictionary: NSDictionary
{
OFDictionary *_dictionary;
}
- initWithOFDictionary: (OFDictionary *)dictionary;
- (instancetype)initWithOFDictionary: (OFDictionary *)dictionary;
@end
NS_ASSUME_NONNULL_END
|
Modified src/bridge/NSDictionary_OFDictionary.m
from [8917cda49a]
to [98dbb05ad2].
︙ | | |
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
-
+
|
#import "NSBridging.h"
#import "OFBridging.h"
#import "OFOutOfRangeException.h"
@implementation NSDictionary_OFDictionary
- initWithOFDictionary: (OFDictionary *)dictionary
- (instancetype)initWithOFDictionary: (OFDictionary *)dictionary
{
if ((self = [super init]) != nil) {
@try {
_dictionary = [dictionary retain];
} @catch (id e) {
return nil;
}
|
︙ | | |
Modified src/bridge/OFArray_NSArray.h
from [de8c239436]
to [ac8674a52c].
︙ | | |
29
30
31
32
33
34
35
36
37
38
39
|
29
30
31
32
33
34
35
36
37
38
39
|
-
+
|
@class NSArray;
@interface OFArray_NSArray: OFArray
{
NSArray *_array;
}
- initWithNSArray: (NSArray *)array;
- (instancetype)initWithNSArray: (NSArray *)array;
@end
OF_ASSUME_NONNULL_END
|
Modified src/bridge/OFArray_NSArray.m
from [94ceef5c3f]
to [f4bf332284].
︙ | | |
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
-
+
|
#import "OFArray_NSArray.h"
#import "NSBridging.h"
#import "OFInitializationFailedException.h"
#import "OFOutOfRangeException.h"
@implementation OFArray_NSArray
- initWithNSArray: (NSArray *)array
- (instancetype)initWithNSArray: (NSArray *)array
{
self = [super init];
@try {
if (array == nil)
@throw [OFInitializationFailedException
exceptionWithClass: [self class]];
|
︙ | | |
Modified src/bridge/OFDictionary_NSDictionary.h
from [c4deae7130]
to [715e8090cc].
︙ | | |
29
30
31
32
33
34
35
36
37
38
39
|
29
30
31
32
33
34
35
36
37
38
39
|
-
+
|
@class NSDictionary;
@interface OFDictionary_NSDictionary: OFDictionary
{
NSDictionary *_dictionary;
}
- initWithNSDictionary: (NSDictionary *)dictionary;
- (instancetype)initWithNSDictionary: (NSDictionary *)dictionary;
@end
OF_ASSUME_NONNULL_END
|
Modified src/bridge/OFDictionary_NSDictionary.m
from [8b7a3db643]
to [eb2c9a4bcd].
︙ | | |
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
-
+
|
#import "NSBridging.h"
#import "OFBridging.h"
#import "OFInitializationFailedException.h"
@implementation OFDictionary_NSDictionary
- initWithNSDictionary: (NSDictionary *)dictionary
- (instancetype)initWithNSDictionary: (NSDictionary *)dictionary
{
self = [super init];
@try {
if (dictionary == nil)
@throw [OFInitializationFailedException
exceptionWithClass: [self class]];
|
︙ | | |
Modified src/exceptions/OFAcceptFailedException.h
from [f3f5b9898b]
to [b45d336249].
︙ | | |
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
|
-
+
-
-
+
+
|
* @param socket The socket which could not accept a connection
* @param errNo The errno for the error
* @return A new, autoreleased accept failed exception
*/
+ (instancetype)exceptionWithSocket: (id)socket
errNo: (int)errNo;
- init OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
/*!
* @brief Initializes an already allocated accept failed exception.
*
* @param socket The socket which could not accept a connection
* @param errNo The errno for the error
* @return An initialized accept failed exception
*/
- initWithSocket: (id)socket
errNo: (int)errNo OF_DESIGNATED_INITIALIZER;
- (instancetype)initWithSocket: (id)socket
errNo: (int)errNo OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|
Modified src/exceptions/OFAcceptFailedException.m
from [439bad1241]
to [d1a001ebd2].
︙ | | |
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
-
+
-
-
+
+
|
+ (instancetype)exceptionWithSocket: (id)socket
errNo: (int)errNo
{
return [[[self alloc] initWithSocket: socket
errNo: errNo] autorelease];
}
- init
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
- initWithSocket: (id)socket
errNo: (int)errNo
- (instancetype)initWithSocket: (id)socket
errNo: (int)errNo
{
self = [super init];
_socket = [socket retain];
_errNo = errNo;
return self;
|
︙ | | |
Modified src/exceptions/OFAddressTranslationFailedException.h
from [5b1e721875]
to [4e44a31efb].
︙ | | |
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
-
+
|
/*!
* @brief Initializes an already allocated address translation failed exception.
*
* @param host The host for which translation was requested
* @return An initialized address translation failed exception
*/
- initWithHost: (nullable OFString *)host;
- (instancetype)initWithHost: (nullable OFString *)host;
- (instancetype)initWithError: (int)error;
- (instancetype)initWithHost: (nullable OFString *)host
error: (int)error OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|
Modified src/exceptions/OFAddressTranslationFailedException.m
from [aad664818a]
to [90f36f15a1].
︙ | | |
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
-
+
-
+
|
+ (instancetype)exceptionWithHost: (OFString *)host
error: (int)error
{
return [[[self alloc] initWithHost: host
error: error] autorelease];
}
- init
- (instancetype)init
{
return [self initWithHost: nil
error: 0];
}
- initWithHost: (OFString *)host
- (instancetype)initWithHost: (OFString *)host
{
return [self initWithHost: host
error: 0];
}
- (instancetype)initWithError: (int)error
{
|
︙ | | |
Modified src/exceptions/OFAllocFailedException.h
from [8b53870092]
to [0099b45139].
︙ | | |
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
-
+
|
* This is the only exception which is not an OFException as it's special. It
* does not know for which class allocation failed and it should not be handled
* like other exceptions, as the exception handling code is not allowed to
* allocate *any* memory.
*/
@interface OFAllocFailedException: OFObject
+ (instancetype)exception OF_UNAVAILABLE;
- init OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
/*!
* @brief Returns a description of the exception.
*
* @return A description of the exception
*/
- (OFString *)description;
@end
OF_ASSUME_NONNULL_END
|
Modified src/exceptions/OFAllocFailedException.m
from [259e8f3f61]
to [a4ecf96225].
︙ | | |
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
-
+
-
+
|
@implementation OFAllocFailedException
+ (instancetype)exception
{
OF_UNRECOGNIZED_SELECTOR
}
+ alloc
+ (instancetype)alloc
{
OF_UNRECOGNIZED_SELECTOR
}
- init
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
- (void *)allocMemoryWithSize: (size_t)size
{
OF_UNRECOGNIZED_SELECTOR
|
︙ | | |
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
-
+
-
+
|
}
- (void)freeMemory: (void *)ptr
{
OF_UNRECOGNIZED_SELECTOR
}
- retain
- (instancetype)retain
{
return self;
}
- autorelease
- (instancetype)autorelease
{
return self;
}
- (unsigned int)retainCount
{
return OF_RETAIN_COUNT_MAX;
|
︙ | | |
Modified src/exceptions/OFAlreadyConnectedException.h
from [2c13417f6e]
to [a11c10e218].
︙ | | |
49
50
51
52
53
54
55
56
57
58
59
|
49
50
51
52
53
54
55
56
57
58
59
|
-
+
|
/*!
* @brief Initializes an already allocated already connected exception.
*
* @param socket The socket which is already connected
* @return An initialized already connected exception
*/
- initWithSocket: (nullable id)socket OF_DESIGNATED_INITIALIZER;
- (instancetype)initWithSocket: (nullable id)socket OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|
Modified src/exceptions/OFAlreadyConnectedException.m
from [2c5cb8ffaf]
to [87e3797b38].
︙ | | |
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
-
+
-
+
|
@synthesize socket = _socket;
+ (instancetype)exceptionWithSocket: (id)socket
{
return [[[self alloc] initWithSocket: socket] autorelease];
}
- init
- (instancetype)init
{
return [self initWithSocket: nil];
}
- initWithSocket: (id)socket
- (instancetype)initWithSocket: (id)socket
{
self = [super init];
_socket = [socket retain];
return self;
}
|
︙ | | |
Modified src/exceptions/OFBindFailedException.h
from [abb5a72bf9]
to [289285d273].
︙ | | |
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
|
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
|
-
+
-
-
-
-
+
+
+
+
|
* @return A new, autoreleased bind failed exception
*/
+ (instancetype)exceptionWithHost: (OFString *)host
port: (uint16_t)port
socket: (id)socket
errNo: (int)errNo;
- init OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
/*!
* @brief Initializes an already allocated bind failed exception.
*
* @param host The host on which binding failed
* @param port The port on which binding failed
* @param socket The socket which could not be bound
* @param errNo The errno of the error that occurred
* @return An initialized bind failed exception
*/
- initWithHost: (OFString *)host
port: (uint16_t)port
socket: (id)socket
errNo: (int)errNo OF_DESIGNATED_INITIALIZER;
- (instancetype)initWithHost: (OFString *)host
port: (uint16_t)port
socket: (id)socket
errNo: (int)errNo OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|
Modified src/exceptions/OFBindFailedException.m
from [ab8d2f4945]
to [ae1fe23608].
︙ | | |
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
-
+
-
-
-
-
+
+
+
+
|
{
return [[[self alloc] initWithHost: host
port: port
socket: socket
errNo: errNo] autorelease];
}
- init
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
- initWithHost: (OFString *)host
port: (uint16_t)port
socket: (id)socket
errNo: (int)errNo
- (instancetype)initWithHost: (OFString *)host
port: (uint16_t)port
socket: (id)socket
errNo: (int)errNo
{
self = [super init];
@try {
_host = [host copy];
_port = port;
_socket = [socket retain];
|
︙ | | |
Modified src/exceptions/OFChangeCurrentDirectoryPathFailedException.h
from [91d577cecc]
to [d3901fd058].
︙ | | |
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
|
-
+
-
-
+
+
|
* changed
* @param errNo The errno of the error that occurred
* @return A new, autoreleased change current directory path failed exception
*/
+ (instancetype)exceptionWithPath: (OFString *)path
errNo: (int)errNo;
- init OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
/*!
* @brief Initializes an already allocated change directory failed exception.
*
* @param path The path of the directory to which the current path could not be
* changed
* @param errNo The errno of the error that occurred
* @return An initialized change current directory path failed exception
*/
- initWithPath: (OFString *)path
errNo: (int)errNo OF_DESIGNATED_INITIALIZER;
- (instancetype)initWithPath: (OFString *)path
errNo: (int)errNo OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|
Modified src/exceptions/OFChangeCurrentDirectoryPathFailedException.m
from [44d470ce9a]
to [ad58994a19].
︙ | | |
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
-
+
-
-
+
+
|
+ (instancetype)exceptionWithPath: (OFString *)path
errNo: (int)errNo
{
return [[[self alloc] initWithPath: path
errNo: errNo] autorelease];
}
- init
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
- initWithPath: (OFString *)path
errNo: (int)errNo
- (instancetype)initWithPath: (OFString *)path
errNo: (int)errNo
{
self = [super init];
@try {
_path = [path copy];
_errNo = errNo;
} @catch (id e) {
|
︙ | | |
Modified src/exceptions/OFChangeOwnerFailedException.h
from [a7274cde75]
to [047184a346].
︙ | | |
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
|
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
|
-
+
-
-
-
-
+
+
+
+
|
* @return A new, autoreleased change owner failed exception
*/
+ (instancetype)exceptionWithPath: (OFString *)path
owner: (nullable OFString *)owner
group: (nullable OFString *)group
errNo: (int)errNo;
- init OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
/*!
* @brief Initializes an already allocated change owner failed exception.
*
* @param path The path of the item
* @param owner The new owner for the item
* @param group The new group for the item
* @param errNo The errno of the error that occurred
* @return An initialized change owner failed exception
*/
- initWithPath: (OFString *)path
owner: (nullable OFString *)owner
group: (nullable OFString *)group
errNo: (int)errNo OF_DESIGNATED_INITIALIZER;
- (instancetype)initWithPath: (OFString *)path
owner: (nullable OFString *)owner
group: (nullable OFString *)group
errNo: (int)errNo OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|
Modified src/exceptions/OFChangeOwnerFailedException.m
from [720452cd67]
to [45d05457a0].
︙ | | |
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
|
-
+
-
-
-
-
+
+
+
+
|
{
return [[[self alloc] initWithPath: path
owner: owner
group: group
errNo: errNo] autorelease];
}
- init
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
- initWithPath: (OFString *)path
owner: (OFString *)owner
group: (OFString *)group
errNo: (int)errNo
- (instancetype)initWithPath: (OFString *)path
owner: (OFString *)owner
group: (OFString *)group
errNo: (int)errNo
{
self = [super init];
@try {
_path = [path copy];
_owner = [owner copy];
_group = [group copy];
|
︙ | | |
Modified src/exceptions/OFChangePermissionsFailedException.h
from [4201269912]
to [e21328b322].
︙ | | |
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
-
+
-
-
-
+
+
+
|
* @param errNo The errno of the error that occurred
* @return A new, autoreleased change permissions failed exception
*/
+ (instancetype)exceptionWithPath: (OFString *)path
permissions: (uint16_t)permissions
errNo: (int)errNo;
- init OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
/*!
* @brief Initializes an already allocated change permissions failed exception.
*
* @param path The path of the item
* @param permissions The new permissions for the item
* @param errNo The errno of the error that occurred
* @return An initialized change permissions failed exception
*/
- initWithPath: (OFString *)path
permissions: (uint16_t)permissions
errNo: (int)errNo OF_DESIGNATED_INITIALIZER;
- (instancetype)initWithPath: (OFString *)path
permissions: (uint16_t)permissions
errNo: (int)errNo OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|
Modified src/exceptions/OFChangePermissionsFailedException.m
from [bcf2de59e3]
to [63b300e4d8].
︙ | | |
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
-
+
-
-
-
+
+
+
|
errNo: (int)errNo
{
return [[[self alloc] initWithPath: path
permissions: permissions
errNo: errNo] autorelease];
}
- init
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
- initWithPath: (OFString *)path
permissions: (uint16_t)permissions
errNo: (int)errNo
- (instancetype)initWithPath: (OFString *)path
permissions: (uint16_t)permissions
errNo: (int)errNo
{
self = [super init];
@try {
_path = [path copy];
_permissions = permissions;
_errNo = errNo;
|
︙ | | |
Modified src/exceptions/OFConditionBroadcastFailedException.h
from [c6d8b7a920]
to [48c276f516].
︙ | | |
51
52
53
54
55
56
57
58
59
60
61
62
|
51
52
53
54
55
56
57
58
59
60
61
62
|
-
+
|
/*!
* @brief Initializes an already allocated condition broadcast failed exception.
*
* @param condition The condition which could not be broadcasted
* @return An initialized condition broadcast failed exception
*/
- initWithCondition: (nullable OFCondition *)condition
- (instancetype)initWithCondition: (nullable OFCondition *)condition
OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|
Modified src/exceptions/OFConditionBroadcastFailedException.m
from [fe181a3605]
to [9b937bfbc7].
︙ | | |
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
-
+
-
+
|
@synthesize condition = _condition;
+ (instancetype)exceptionWithCondition: (OFCondition *)condition
{
return [[[self alloc] initWithCondition: condition] autorelease];
}
- init
- (instancetype)init
{
return [self initWithCondition: nil];
}
- initWithCondition: (OFCondition *)condition
- (instancetype)initWithCondition: (OFCondition *)condition
{
self = [super init];
_condition = [condition retain];
return self;
}
|
︙ | | |
Modified src/exceptions/OFConditionSignalFailedException.h
from [2a40e271f6]
to [ce33dbc69a].
︙ | | |
51
52
53
54
55
56
57
58
59
60
61
62
|
51
52
53
54
55
56
57
58
59
60
61
62
|
-
+
|
/*!
* @brief Initializes an already allocated condition signal failed exception.
*
* @param condition The condition which could not be signaled
* @return An initialized condition signal failed exception
*/
- initWithCondition: (nullable OFCondition *)condition
- (instancetype)initWithCondition: (nullable OFCondition *)condition
OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|
Modified src/exceptions/OFConditionSignalFailedException.m
from [52c03f4667]
to [53f9f1314d].
︙ | | |
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
-
+
-
+
|
@synthesize condition = _condition;
+ (instancetype)exceptionWithCondition: (OFCondition *)condition
{
return [[[self alloc] initWithCondition: condition] autorelease];
}
- init
- (instancetype)init
{
return [self initWithCondition: nil];
}
- initWithCondition: (OFCondition *)condition
- (instancetype)initWithCondition: (OFCondition *)condition
{
self = [super init];
_condition = [condition retain];
return self;
}
|
︙ | | |
Modified src/exceptions/OFConditionStillWaitingException.h
from [e274ecefc5]
to [3efd694bea].
︙ | | |
52
53
54
55
56
57
58
59
60
61
62
63
|
52
53
54
55
56
57
58
59
60
61
62
63
|
-
+
|
/*!
* @brief Initializes an already allocated condition still waiting exception.
*
* @param condition The condition for which is still being waited
* @return An initialized condition still waiting exception
*/
- initWithCondition: (nullable OFCondition *)condition
- (instancetype)initWithCondition: (nullable OFCondition *)condition
OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|
Modified src/exceptions/OFConditionStillWaitingException.m
from [bf32de4933]
to [e2d3cc4836].
︙ | | |
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
-
+
-
+
|
@synthesize condition = _condition;
+ (instancetype)exceptionWithCondition: (OFCondition *)condition
{
return [[[self alloc] initWithCondition: condition] autorelease];
}
- init
- (instancetype)init
{
return [self initWithCondition: nil];
}
- initWithCondition: (OFCondition *)condition
- (instancetype)initWithCondition: (OFCondition *)condition
{
self = [super init];
_condition = [condition retain];
return self;
}
|
︙ | | |
Modified src/exceptions/OFConditionWaitFailedException.h
from [18e49a2572]
to [9b74caeeef].
︙ | | |
51
52
53
54
55
56
57
58
59
60
61
62
|
51
52
53
54
55
56
57
58
59
60
61
62
|
-
+
|
/*!
* @brief Initializes an already allocated condition wait failed exception.
*
* @param condition The condition for which could not be waited
* @return An initialized condition wait failed exception
*/
- initWithCondition: (nullable OFCondition *)condition
- (instancetype)initWithCondition: (nullable OFCondition *)condition
OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|
Modified src/exceptions/OFConditionWaitFailedException.m
from [6f1e6cd9f4]
to [9d72b3631e].
︙ | | |
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
-
+
-
+
|
@synthesize condition = _condition;
+ (instancetype)exceptionWithCondition: (OFCondition *)condition
{
return [[[self alloc] initWithCondition: condition] autorelease];
}
- init
- (instancetype)init
{
return [self initWithCondition: nil];
}
- initWithCondition: (OFCondition *)condition
- (instancetype)initWithCondition: (OFCondition *)condition
{
self = [super init];
_condition = [condition retain];
return self;
}
|
︙ | | |
Modified src/exceptions/OFConnectionFailedException.h
from [3d845cb880]
to [ecf1b8d37c].
︙ | | |
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
|
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
|
-
+
-
-
-
-
+
+
+
+
|
* @return A new, autoreleased connection failed exception
*/
+ (instancetype)exceptionWithHost: (OFString *)host
port: (uint16_t)port
socket: (id)socket
errNo: (int)errNo;
- init OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
/*!
* @brief Initializes an already allocated connection failed exception.
*
* @param host The host to which the connection failed
* @param port The port on the host to which the connection failed
* @param socket The socket which could not connect
* @param errNo The errno of the error that occurred
* @return An initialized connection failed exception
*/
- initWithHost: (OFString *)host
port: (uint16_t)port
socket: (id)socket
errNo: (int)errNo OF_DESIGNATED_INITIALIZER;
- (instancetype)initWithHost: (OFString *)host
port: (uint16_t)port
socket: (id)socket
errNo: (int)errNo OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|
Modified src/exceptions/OFConnectionFailedException.m
from [b27bc422f6]
to [3c5a633219].
︙ | | |
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
-
+
-
-
-
-
+
+
+
+
|
{
return [[[self alloc] initWithHost: host
port: port
socket: socket
errNo: errNo] autorelease];
}
- init
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
- initWithHost: (OFString *)host
port: (uint16_t)port
socket: (id)socket
errNo: (int)errNo
- (instancetype)initWithHost: (OFString *)host
port: (uint16_t)port
socket: (id)socket
errNo: (int)errNo
{
self = [super init];
@try {
_host = [host copy];
_socket = [socket retain];
_port = port;
|
︙ | | |
Modified src/exceptions/OFCopyItemFailedException.h
from [686e99d584]
to [236c740781].
︙ | | |
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
-
+
-
-
-
+
+
+
|
* @param errNo The errno of the error that occurred
* @return A new, autoreleased copy item failed exception
*/
+ (instancetype)exceptionWithSourcePath: (OFString *)sourcePath
destinationPath: (OFString *)destinationPath
errNo: (int)errNo;
- init OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
/*!
* @brief Initializes an already allocated copy item failed exception.
*
* @param sourcePath The original path
* @param destinationPath The new path
* @param errNo The errno of the error that occurred
* @return An initialized copy item failed exception
*/
- initWithSourcePath: (OFString *)sourcePath
destinationPath: (OFString *)destinationPath
errNo: (int)errNo OF_DESIGNATED_INITIALIZER;
- (instancetype)initWithSourcePath: (OFString *)sourcePath
destinationPath: (OFString *)destinationPath
errNo: (int)errNo OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|
Modified src/exceptions/OFCopyItemFailedException.m
from [2724ad2ead]
to [b180cf60f6].
︙ | | |
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
-
+
-
-
-
+
+
+
|
errNo: (int)errNo
{
return [[[self alloc] initWithSourcePath: sourcePath
destinationPath: destinationPath
errNo: errNo] autorelease];
}
- init
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
- initWithSourcePath: (OFString *)sourcePath
destinationPath: (OFString *)destinationPath
errNo: (int)errNo
- (instancetype)initWithSourcePath: (OFString *)sourcePath
destinationPath: (OFString *)destinationPath
errNo: (int)errNo
{
self = [super init];
@try {
_sourcePath = [sourcePath copy];
_destinationPath = [destinationPath copy];
_errNo = errNo;
|
︙ | | |
Modified src/exceptions/OFCreateDirectoryFailedException.h
from [f29603b825]
to [f119eab461].
︙ | | |
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
-
+
-
-
+
+
|
* created
* @param errNo The errno of the error that occurred
* @return A new, autoreleased create directory failed exception
*/
+ (instancetype)exceptionWithPath: (OFString *)path
errNo: (int)errNo;
- init OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
/*!
* @brief Initializes an already allocated create directory failed exception.
*
* @param path A string with the path of the directory which could not be
* created
* @param errNo The errno of the error that occurred
* @return An initialized create directory failed exception
*/
- initWithPath: (OFString *)path
errNo: (int)errNo OF_DESIGNATED_INITIALIZER;
- (instancetype)initWithPath: (OFString *)path
errNo: (int)errNo OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|
Modified src/exceptions/OFCreateDirectoryFailedException.m
from [330ed07c9c]
to [ef4b8f855c].
︙ | | |
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
-
+
-
-
+
+
|
+ (instancetype)exceptionWithPath: (OFString *)path
errNo: (int)errNo
{
return [[[self alloc] initWithPath: path
errNo: errNo] autorelease];
}
- init
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
- initWithPath: (OFString *)path
errNo: (int)errNo
- (instancetype)initWithPath: (OFString *)path
errNo: (int)errNo
{
self = [super init];
@try {
_path = [path copy];
_errNo = errNo;
} @catch (id e) {
|
︙ | | |
Modified src/exceptions/OFCreateSymbolicLinkFailedException.h
from [3eec281c64]
to [5b6994b167].
︙ | | |
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
|
-
+
-
-
-
+
+
+
|
* @param errNo The errno of the error that occurred
* @return A new, autoreleased create symbolic link failed exception
*/
+ (instancetype)exceptionWithSourcePath: (OFString *)sourcePath
destinationPath: (OFString *)destinationPath
errNo: (int)errNo;
- init OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
/*!
* @brief Initializes an already allocated create symbolic link failed
* exception.
*
* @param sourcePath The source for the symbolic link
* @param destinationPath The destination for the symbolic link
* @param errNo The errno of the error that occurred
* @return An initialized create symbolic link failed exception
*/
- initWithSourcePath: (OFString *)sourcePath
destinationPath: (OFString *)destinationPath
errNo: (int)errNo OF_DESIGNATED_INITIALIZER;
- (instancetype)initWithSourcePath: (OFString *)sourcePath
destinationPath: (OFString *)destinationPath
errNo: (int)errNo OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|
Modified src/exceptions/OFCreateSymbolicLinkFailedException.m
from [71facb8b37]
to [650806d944].
︙ | | |
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
-
+
-
-
-
+
+
+
|
errNo: (int)errNo
{
return [[[self alloc] initWithSourcePath: sourcePath
destinationPath: destinationPath
errNo: errNo] autorelease];
}
- init
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
- initWithSourcePath: (OFString *)sourcePath
destinationPath: (OFString *)destinationPath
errNo: (int)errNo
- (instancetype)initWithSourcePath: (OFString *)sourcePath
destinationPath: (OFString *)destinationPath
errNo: (int)errNo
{
self = [super init];
@try {
_sourcePath = [sourcePath copy];
_destinationPath = [destinationPath copy];
_errNo = errNo;
|
︙ | | |
Modified src/exceptions/OFEnumerationMutationException.h
from [fed4c58df5]
to [a58b80edb6].
︙ | | |
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
-
+
-
+
|
* @brief Creates a new, autoreleased enumeration mutation exception.
*
* @param object The object which was mutated during enumeration
* @return A new, autoreleased enumeration mutation exception
*/
+ (instancetype)exceptionWithObject: (id)object;
- init OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
/*!
* @brief Initializes an already allocated enumeration mutation exception.
*
* @param object The object which was mutated during enumeration
* @return An initialized enumeration mutation exception
*/
- initWithObject: (id)object OF_DESIGNATED_INITIALIZER;
- (instancetype)initWithObject: (id)object OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|
Modified src/exceptions/OFEnumerationMutationException.m
from [2fb4ca567c]
to [ad9e55bfc4].
︙ | | |
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
-
+
-
+
|
}
+ (instancetype)exceptionWithObject: (id)object
{
return [[[self alloc] initWithObject: object] autorelease];
}
- init
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
- initWithObject: (id)object
- (instancetype)initWithObject: (id)object
{
self = [super init];
_object = [object retain];
return self;
}
|
︙ | | |
Modified src/exceptions/OFException.m
from [a4f5d8c32c]
to [821a0dbd2f].
︙ | | |
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
|
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
|
-
+
|
@implementation OFException
+ (instancetype)exception
{
return [[[self alloc] init] autorelease];
}
#ifdef HAVE_DWARF_EXCEPTIONS
- init
- (instancetype)init
{
struct backtrace_ctx ctx;
self = [super init];
ctx.backtrace = _backtrace;
ctx.i = 0;
|
︙ | | |
Modified src/exceptions/OFGetOptionFailedException.h
from [0308db8cf6]
to [323844d58f].
︙ | | |
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
-
+
-
-
+
+
|
* @param stream The stream for which the option could not be gotten
* @param errNo The errno of the error that occurred
* @return A new, autoreleased get option failed exception
*/
+ (instancetype)exceptionWithStream: (OFStream *)stream
errNo: (int)errNo;
- init OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
/*!
* @brief Initializes an already allocated get option failed exception.
*
* @param stream The stream for which the option could not be gotten
* @param errNo The errno of the error that occurred
* @return An initialized get option failed exception
*/
- initWithStream: (OFStream *)stream
errNo: (int)errNo OF_DESIGNATED_INITIALIZER;
- (instancetype)initWithStream: (OFStream *)stream
errNo: (int)errNo OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|
Modified src/exceptions/OFGetOptionFailedException.m
from [72e358014a]
to [98bfddd807].
︙ | | |
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
-
+
-
-
+
+
|
+ (instancetype)exceptionWithStream: (OFStream *)stream
errNo: (int)errNo
{
return [[[self alloc] initWithStream: stream
errNo: errNo] autorelease];
}
- init
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
- initWithStream: (OFStream *)stream
errNo: (int)errNo
- (instancetype)initWithStream: (OFStream *)stream
errNo: (int)errNo
{
self = [super init];
_stream = [stream retain];
_errNo = errNo;
return self;
|
︙ | | |
Modified src/exceptions/OFHTTPRequestFailedException.h
from [d6872c389b]
to [1a9a49c81c].
︙ | | |
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
|
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
-
+
-
-
+
+
+
|
* @param request The HTTP request which failed
* @param response The response for the failed HTTP request
* @return A new, autoreleased HTTP request failed exception
*/
+ (instancetype)exceptionWithRequest: (OFHTTPRequest *)request
response: (OFHTTPResponse *)response;
- init OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
/*!
* @brief Initializes an already allocated HTTP request failed exception.
*
* @param request The HTTP request which failed
* @param response The response for the failed HTTP request
* @return A new HTTP request failed exception
*/
- initWithRequest: (OFHTTPRequest *)request
response: (OFHTTPResponse *)response OF_DESIGNATED_INITIALIZER;
- (instancetype)initWithRequest: (OFHTTPRequest *)request
response: (OFHTTPResponse *)response
OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|
Modified src/exceptions/OFHTTPRequestFailedException.m
from [e70088b5fe]
to [647526aed7].
︙ | | |
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
-
+
-
-
+
+
|
+ (instancetype)exceptionWithRequest: (OFHTTPRequest *)request
response: (OFHTTPResponse *)response
{
return [[[self alloc] initWithRequest: request
response: response] autorelease];
}
- init
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
- initWithRequest: (OFHTTPRequest *)request
response: (OFHTTPResponse *)response
- (instancetype)initWithRequest: (OFHTTPRequest *)request
response: (OFHTTPResponse *)response
{
self = [super init];
_request = [request retain];
_response = [response retain];
return self;
|
︙ | | |
Modified src/exceptions/OFHashAlreadyCalculatedException.h
from [c4a33a3e2f]
to [354dd8d292].
︙ | | |
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
-
+
-
+
|
* @brief Creates a new, autoreleased hash already calculated exception.
*
* @param object The hash which has already been calculated
* @return A new, autoreleased hash already calculated exception
*/
+ (instancetype)exceptionWithObject: (id)object;
- init OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
/*!
* @brief Initializes an already allocated hash already calculated exception.
*
* @param object The hash which has already been calculated
* @return An initialized hash already calculated exception
*/
- initWithObject: (id)object OF_DESIGNATED_INITIALIZER;
- (instancetype)initWithObject: (id)object OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|
Modified src/exceptions/OFHashAlreadyCalculatedException.m
from [0c47500461]
to [0a3cc39214].
︙ | | |
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
-
+
-
+
|
}
+ (instancetype)exceptionWithObject: (id)object
{
return [[[self alloc] initWithObject: object] autorelease];
}
- init
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
- initWithObject: (id)object
- (instancetype)initWithObject: (id)object
{
self = [super init];
_object = [object retain];
return self;
}
|
︙ | | |
Modified src/exceptions/OFInitializationFailedException.h
from [f78e956c14]
to [b799f88c6f].
︙ | | |
45
46
47
48
49
50
51
52
53
54
55
|
45
46
47
48
49
50
51
52
53
54
55
|
-
+
|
/*!
* @brief Initializes an already allocated initialization failed exception.
*
* @param class_ The class for which initialization failed
* @return An initialized initialization failed exception
*/
- initWithClass: (nullable Class)class_ OF_DESIGNATED_INITIALIZER;
- (instancetype)initWithClass: (nullable Class)class_ OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|
Modified src/exceptions/OFInitializationFailedException.m
from [a45044fb6a]
to [9280686d49].
︙ | | |
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
-
+
-
+
|
@synthesize inClass = _inClass;
+ (instancetype)exceptionWithClass: (Class)class
{
return [[[self alloc] initWithClass: class] autorelease];
}
- init
- (instancetype)init
{
return [self initWithClass: Nil];
}
- initWithClass: (Class)class
- (instancetype)initWithClass: (Class)class
{
self = [super init];
_inClass = class;
return self;
}
|
︙ | | |
Modified src/exceptions/OFInvalidJSONException.h
from [0ac6dc1b4d]
to [bdcf54a68b].
︙ | | |
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
-
+
-
-
+
+
|
* @param string The string containing the invalid JSON representation
* @param line The line in which the parsing error was encountered
* @return A new, autoreleased invalid JSON exception
*/
+ (instancetype)exceptionWithString: (nullable OFString *)string
line: (size_t)line;
- init OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
/*!
* @brief Initializes an already allocated invalid JSON exception.
*
* @param string The string containing the invalid JSON representation
* @param line The line in which the parsing error was encountered
* @return An initialized invalid JSON exception
*/
- initWithString: (nullable OFString *)string
line: (size_t)line OF_DESIGNATED_INITIALIZER;
- (instancetype)initWithString: (nullable OFString *)string
line: (size_t)line OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|
Modified src/exceptions/OFInvalidJSONException.m
from [532f763bed]
to [f68636631d].
︙ | | |
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
-
+
-
-
+
+
|
+ (instancetype)exceptionWithString: (OFString *)string
line: (size_t)line
{
return [[[self alloc] initWithString: string
line: line] autorelease];
}
- init
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
- initWithString: (OFString *)string
line: (size_t)line
- (instancetype)initWithString: (OFString *)string
line: (size_t)line
{
self = [super init];
@try {
_string = [string copy];
_line = line;
} @catch (id e) {
|
︙ | | |
Modified src/exceptions/OFLinkFailedException.h
from [dc4516a136]
to [a01a95a159].
︙ | | |
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
-
+
-
-
-
+
+
+
|
* @param errNo The errno of the error that occurred
* @return A new, autoreleased link failed exception
*/
+ (instancetype)exceptionWithSourcePath: (OFString *)sourcePath
destinationPath: (OFString *)destinationPath
errNo: (int)errNo;
- init OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
/*!
* @brief Initializes an already allocated link failed exception.
*
* @param sourcePath The source for the link
* @param destinationPath The destination for the link
* @param errNo The errno of the error that occurred
* @return An initialized link failed exception
*/
- initWithSourcePath: (OFString *)sourcePath
destinationPath: (OFString *)destinationPath
errNo: (int)errNo OF_DESIGNATED_INITIALIZER;
- (instancetype)initWithSourcePath: (OFString *)sourcePath
destinationPath: (OFString *)destinationPath
errNo: (int)errNo OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|
Modified src/exceptions/OFLinkFailedException.m
from [c7dbe92309]
to [569378f421].
︙ | | |
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
-
+
-
-
-
+
+
+
|
errNo: (int)errNo
{
return [[[self alloc] initWithSourcePath: sourcePath
destinationPath: destinationPath
errNo: errNo] autorelease];
}
- init
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
- initWithSourcePath: (OFString *)sourcePath
destinationPath: (OFString *)destinationPath
errNo: (int)errNo
- (instancetype)initWithSourcePath: (OFString *)sourcePath
destinationPath: (OFString *)destinationPath
errNo: (int)errNo
{
self = [super init];
@try {
_sourcePath = [sourcePath copy];
_destinationPath = [destinationPath copy];
_errNo = errNo;
|
︙ | | |
Modified src/exceptions/OFListenFailedException.h
from [69aa18b2cb]
to [9104f958e2].
︙ | | |
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
-
+
-
-
-
+
+
+
|
* @param errNo The errno of the error that occurred
* @return A new, autoreleased listen failed exception
*/
+ (instancetype)exceptionWithSocket: (id)socket
backLog: (int)backLog
errNo: (int)errNo;
- init OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
/*!
* @brief Initializes an already allocated listen failed exception
*
* @param socket The socket which failed to listen
* @param backLog The requested size of the back log
* @param errNo The errno of the error that occurred
* @return An initialized listen failed exception
*/
- initWithSocket: (id)socket
backLog: (int)backLog
errNo: (int)errNo OF_DESIGNATED_INITIALIZER;
- (instancetype)initWithSocket: (id)socket
backLog: (int)backLog
errNo: (int)errNo OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|
Modified src/exceptions/OFListenFailedException.m
from [d70f3265c2]
to [9093d440de].
︙ | | |
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
-
+
-
-
-
+
+
+
|
errNo: (int)errNo
{
return [[[self alloc] initWithSocket: socket
backLog: backLog
errNo: errNo] autorelease];
}
- init
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
- initWithSocket: (id)socket
backLog: (int)backLog
errNo: (int)errNo
- (instancetype)initWithSocket: (id)socket
backLog: (int)backLog
errNo: (int)errNo
{
self = [super init];
_socket = [socket retain];
_backLog = backLog;
_errNo = errNo;
|
︙ | | |
Modified src/exceptions/OFLockFailedException.h
from [3ccea224dd]
to [689016254d].
︙ | | |
45
46
47
48
49
50
51
52
53
54
55
|
45
46
47
48
49
50
51
52
53
54
55
56
|
-
+
+
|
/*!
* @brief Initializes an already allocated lock failed exception.
*
* @param lock The lock which could not be locked
* @return An initialized lock failed exception
*/
- initWithLock: (nullable id <OFLocking>)lock OF_DESIGNATED_INITIALIZER;
- (instancetype)initWithLock: (nullable id <OFLocking>)lock
OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|
Modified src/exceptions/OFLockFailedException.m
from [88a51a548f]
to [0ed564b6e9].
︙ | | |
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
-
+
-
+
|
@synthesize lock = _lock;
+ (instancetype)exceptionWithLock: (id <OFLocking>)lock
{
return [[[self alloc] initWithLock: lock] autorelease];
}
- init
- (instancetype)init
{
return [self initWithLock: nil];
}
- initWithLock: (id <OFLocking>)lock
- (instancetype)initWithLock: (id <OFLocking>)lock
{
self = [super init];
_lock = [lock retain];
return self;
}
|
︙ | | |
Modified src/exceptions/OFMalformedXMLException.h
from [fd5549b5bc]
to [5207f028c8].
︙ | | |
46
47
48
49
50
51
52
53
54
55
56
|
46
47
48
49
50
51
52
53
54
55
56
57
|
-
+
+
|
/*!
* @brief Initializes an already allocated malformed XML exception.
*
* @param parser The parser which encountered malformed XML
* @return An initialized malformed XML exception
*/
- initWithParser: (nullable OFXMLParser *)parser OF_DESIGNATED_INITIALIZER;
- (instancetype)initWithParser: (nullable OFXMLParser *)parser
OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|
Modified src/exceptions/OFMalformedXMLException.m
from [388479cf87]
to [f94540986f].
︙ | | |
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
-
+
-
+
|
@synthesize parser = _parser;
+ (instancetype)exceptionWithParser: (OFXMLParser *)parser
{
return [[[self alloc] initWithParser: parser] autorelease];
}
- init
- (instancetype)init
{
return [self initWithParser: nil];
}
- initWithParser: (OFXMLParser *)parser
- (instancetype)initWithParser: (OFXMLParser *)parser
{
self = [super init];
_parser = [parser retain];
return self;
}
|
︙ | | |
Modified src/exceptions/OFMemoryNotPartOfObjectException.h
from [ebaae357da]
to [b7baf69af5].
︙ | | |
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
-
+
-
-
+
+
|
* @param pointer A pointer to the memory that is not part of the object
* @param object The object which the memory is not part of
* @return A new, autoreleased memory not part of object exception
*/
+ (instancetype)exceptionWithPointer: (nullable void *)pointer
object: (id)object;
- init OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
/*!
* @brief Initializes an already allocated memory not part of object exception.
*
* @param pointer A pointer to the memory that is not part of the object
* @param object The object which the memory is not part of
* @return An initialized memory not part of object exception
*/
- initWithPointer: (nullable void *)pointer
object: (id)object OF_DESIGNATED_INITIALIZER;
- (instancetype)initWithPointer: (nullable void *)pointer
object: (id)object OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|
Modified src/exceptions/OFMemoryNotPartOfObjectException.m
from [649609b5d6]
to [2fe39f9049].
︙ | | |
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
-
+
-
-
+
+
|
+ (instancetype)exceptionWithPointer: (void *)pointer
object: (id)object
{
return [[[self alloc] initWithPointer: pointer
object: object] autorelease];
}
- init
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
- initWithPointer: (void *)pointer
object: (id)object
- (instancetype)initWithPointer: (void *)pointer
object: (id)object
{
self = [super init];
_pointer = pointer;
_object = [object retain];
return self;
|
︙ | | |
Modified src/exceptions/OFMoveItemFailedException.h
from [f3aaa9b168]
to [02a6b7d968].
︙ | | |
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
-
+
-
-
-
+
+
+
|
* @param errNo The errno of the error that occurred
* @return A new, autoreleased move item failed exception
*/
+ (instancetype)exceptionWithSourcePath: (OFString *)sourcePath
destinationPath: (OFString *)destinationPath
errNo: (int)errNo;
- init OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
/*!
* @brief Initializes an already allocated move item failed exception.
*
* @param sourcePath The original path
* @param destinationPath The new path
* @param errNo The errno of the error that occurred
* @return An initialized move item failed exception
*/
- initWithSourcePath: (OFString *)sourcePath
destinationPath: (OFString *)destinationPath
errNo: (int)errNo OF_DESIGNATED_INITIALIZER;
- (instancetype)initWithSourcePath: (OFString *)sourcePath
destinationPath: (OFString *)destinationPath
errNo: (int)errNo OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|
Modified src/exceptions/OFMoveItemFailedException.m
from [12cd77657e]
to [265677a4a5].
︙ | | |
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
-
+
-
-
-
+
+
+
|
errNo: (int)errNo
{
return [[[self alloc] initWithSourcePath: sourcePath
destinationPath: destinationPath
errNo: errNo] autorelease];
}
- init
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
- initWithSourcePath: (OFString *)sourcePath
destinationPath: (OFString *)destinationPath
errNo: (int)errNo
- (instancetype)initWithSourcePath: (OFString *)sourcePath
destinationPath: (OFString *)destinationPath
errNo: (int)errNo
{
self = [super init];
@try {
_sourcePath = [sourcePath copy];
_destinationPath = [destinationPath copy];
_errNo = errNo;
|
︙ | | |
Modified src/exceptions/OFNotImplementedException.h
from [c419382595]
to [b85c9dd392].
︙ | | |
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
|
-
+
-
-
+
+
|
* @param selector The selector which is not or not fully implemented
* @param object The object which does not (fully) implement the selector
* @return A new, autoreleased not implemented exception
*/
+ (instancetype)exceptionWithSelector: (SEL)selector
object: (id)object;
- init OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
/*!
* @brief Initializes an already allocated not implemented exception.
*
* @param selector The selector which is not or not fully implemented
* @param object The object which does not (fully) implement the selector
* @return An initialized not implemented exception
*/
- initWithSelector: (SEL)selector
object: (id)object OF_DESIGNATED_INITIALIZER;
- (instancetype)initWithSelector: (SEL)selector
object: (id)object OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|
Modified src/exceptions/OFNotImplementedException.m
from [c3dc3f6ae4]
to [2e20faa1e7].
︙ | | |
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
-
+
-
-
+
+
|
+ (instancetype)exceptionWithSelector: (SEL)selector
object: (id)object
{
return [[[self alloc] initWithSelector: selector
object: object] autorelease];
}
- init
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
- initWithSelector: (SEL)selector
object: (id)object
- (instancetype)initWithSelector: (SEL)selector
object: (id)object
{
self = [super init];
_selector = selector;
_object = [object retain];
return self;
|
︙ | | |
Modified src/exceptions/OFNotOpenException.h
from [3a972e8265]
to [69044522fc].
︙ | | |
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
-
+
-
+
|
* @brief Creates a new, autoreleased not open exception.
*
* @param object The object which is not open, connected or bound
* @return A new, autoreleased not open exception
*/
+ (instancetype)exceptionWithObject: (id)object;
- init OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
/*!
* @brief Initializes an already allocated not open exception.
*
* @param object The object which is not open, connected or bound
* @return An initialized not open exception
*/
- initWithObject: (id)object OF_DESIGNATED_INITIALIZER;
- (instancetype)initWithObject: (id)object OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|
Modified src/exceptions/OFNotOpenException.m
from [f2f0957e2a]
to [dcddd6144c].
︙ | | |
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
-
+
-
+
|
}
+ (instancetype)exceptionWithObject: (id)object
{
return [[[self alloc] initWithObject: object] autorelease];
}
- init
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
- initWithObject: (id)object
- (instancetype)initWithObject: (id)object
{
self = [super init];
_object = [object retain];
return self;
}
|
︙ | | |
Modified src/exceptions/OFObserveFailedException.h
from [eb784e0d21]
to [3b160642ed].
︙ | | |
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
-
+
-
-
+
+
|
* @param observer The observer which failed to observe
* @param errNo The errno of the error that occurred
* @return A new, autoreleased observe failed exception
*/
+ (instancetype)exceptionWithObserver: (OFKernelEventObserver *)observer
errNo: (int)errNo;
- init OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
/*!
* @brief Initializes an already allocated observe failed exception.
*
* @param observer The observer which failed to observe
* @param errNo The errno of the error that occurred
* @return An initialized observe failed exception
*/
- initWithObserver: (OFKernelEventObserver *)observer
errNo: (int)errNo OF_DESIGNATED_INITIALIZER;
- (instancetype)initWithObserver: (OFKernelEventObserver *)observer
errNo: (int)errNo OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|
Modified src/exceptions/OFObserveFailedException.m
from [5ae6b31dd4]
to [c64976f11a].
︙ | | |
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
-
+
-
-
+
+
|
+ (instancetype)exceptionWithObserver: (OFKernelEventObserver *)observer
errNo: (int)errNo
{
return [[[self alloc] initWithObserver: observer
errNo: errNo] autorelease];
}
- init
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
- initWithObserver: (OFKernelEventObserver *)observer
errNo: (int)errNo
- (instancetype)initWithObserver: (OFKernelEventObserver *)observer
errNo: (int)errNo
{
self = [super init];
@try {
_observer = [observer retain];
_errNo = errNo;
} @catch (id e) {
|
︙ | | |
Modified src/exceptions/OFOpenItemFailedException.h
from [b2b63457a8]
to [8cc711f5f5].
︙ | | |
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
-
+
-
-
-
+
+
+
|
* @param errNo The errno of the error that occurred
* @return A new, autoreleased open item failed exception
*/
+ (instancetype)exceptionWithPath: (OFString *)path
mode: (nullable OFString *)mode
errNo: (int)errNo;
- init OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
/*!
* @brief Initializes an already allocated open item failed exception.
*
* @param path A string with the path of the item which could not be opened
* @param mode A string with the mode in which the item should have been opened
* @param errNo The errno of the error that occurred
* @return An initialized open item failed exception
*/
- initWithPath: (OFString *)path
mode: (nullable OFString *)mode
errNo: (int)errNo OF_DESIGNATED_INITIALIZER;
- (instancetype)initWithPath: (OFString *)path
mode: (nullable OFString *)mode
errNo: (int)errNo OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|
Modified src/exceptions/OFOpenItemFailedException.m
from [649447f7ba]
to [0b9774a53f].
︙ | | |
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
-
+
-
-
-
+
+
+
|
errNo: (int)errNo
{
return [[[self alloc] initWithPath: path
mode: mode
errNo: errNo] autorelease];
}
- init
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
- initWithPath: (OFString *)path
mode: (OFString *)mode
errNo: (int)errNo
- (instancetype)initWithPath: (OFString *)path
mode: (OFString *)mode
errNo: (int)errNo
{
self = [super init];
@try {
_path = [path copy];
_mode = [mode copy];
_errNo = errNo;
|
︙ | | |
Modified src/exceptions/OFOutOfMemoryException.h
from [04b0c3927c]
to [aeeb143f52].
︙ | | |
44
45
46
47
48
49
50
51
52
53
54
|
44
45
46
47
48
49
50
51
52
53
54
55
|
-
+
+
|
/*!
* @brief Initializes an already allocated no memory exception.
*
* @param requestedSize The size of the memory that could not be allocated
* @return An initialized no memory exception
*/
- initWithRequestedSize: (size_t)requestedSize OF_DESIGNATED_INITIALIZER;
- (instancetype)initWithRequestedSize: (size_t)requestedSize
OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|
Modified src/exceptions/OFOutOfMemoryException.m
from [3aa81f3781]
to [d40c089e61].
︙ | | |
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
-
+
-
+
|
+ (instancetype)exceptionWithRequestedSize: (size_t)requestedSize
{
return [[[self alloc]
initWithRequestedSize: requestedSize] autorelease];
}
- init
- (instancetype)init
{
return [self initWithRequestedSize: 0];
}
- initWithRequestedSize: (size_t)requestedSize
- (instancetype)initWithRequestedSize: (size_t)requestedSize
{
self = [super init];
_requestedSize = requestedSize;
return self;
}
|
︙ | | |
Modified src/exceptions/OFReadOrWriteFailedException.h
from [76630b46c4]
to [50f44143bc].
︙ | | |
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
-
+
-
-
-
+
+
+
|
* @param errNo The errno of the error that occurred
* @return A new, autoreleased read or write failed exception
*/
+ (instancetype)exceptionWithObject: (id)object
requestedLength: (size_t)requestedLength
errNo: (int)errNo;
- init OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
/*!
* @brief Initializes an already allocated read or write failed exception.
*
* @param object The object from which reading or to which writing failed
* @param requestedLength The requested length of the data that could not be
* read / written
* @param errNo The errno of the error that occurred
* @return A new open file failed exception
*/
- initWithObject: (id)object
requestedLength: (size_t)requestedLength
errNo: (int)errNo OF_DESIGNATED_INITIALIZER;
- (instancetype)initWithObject: (id)object
requestedLength: (size_t)requestedLength
errNo: (int)errNo OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|
Modified src/exceptions/OFReadOrWriteFailedException.m
from [91f716863e]
to [2080a86175].
︙ | | |
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
-
+
-
-
-
+
+
+
|
errNo: (int)errNo
{
return [[[self alloc] initWithObject: object
requestedLength: requestedLength
errNo: errNo] autorelease];
}
- init
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
- initWithObject: (id)object
requestedLength: (size_t)requestedLength
errNo: (int)errNo
- (instancetype)initWithObject: (id)object
requestedLength: (size_t)requestedLength
errNo: (int)errNo
{
self = [super init];
_object = [object retain];
_requestedLength = requestedLength;
_errNo = errNo;
|
︙ | | |
Modified src/exceptions/OFRemoveItemFailedException.h
from [8e15a38aea]
to [f135f025df].
︙ | | |
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
|
-
+
-
-
+
+
|
* @param path The path of the item which could not be removed
* @param errNo The errno of the error that occurred
* @return A new, autoreleased remove item failed exception
*/
+ (instancetype)exceptionWithPath: (OFString *)path
errNo: (int)errNo;
- init OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
/*!
* @brief Initializes an already allocated remove failed exception.
*
* @param path The path of the item which could not be removed
* @param errNo The errno of the error that occurred
* @return An initialized remove item failed exception
*/
- initWithPath: (OFString *)path
errNo: (int)errNo OF_DESIGNATED_INITIALIZER;
- (instancetype)initWithPath: (OFString *)path
errNo: (int)errNo OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|
Modified src/exceptions/OFRemoveItemFailedException.m
from [5cc237476f]
to [44c7b9e59e].
︙ | | |
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
-
+
-
-
+
+
|
+ (instancetype)exceptionWithPath: (OFString *)path
errNo: (int)errNo
{
return [[[self alloc] initWithPath: path
errNo: errNo] autorelease];
}
- init
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
- initWithPath: (OFString *)path
errNo: (int)errNo
- (instancetype)initWithPath: (OFString *)path
errNo: (int)errNo
{
self = [super init];
@try {
_path = [path copy];
_errNo = errNo;
} @catch (id e) {
|
︙ | | |
Modified src/exceptions/OFSandboxActivationFailedException.h
from [d372fc8333]
to [1244c14808].
︙ | | |
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
-
+
-
-
+
+
|
* @param sandbox The sandbox which could not be activated
* @param errNo The errno of the error that occurred
* @return A new, autoreleased sandboxing failed exception
*/
+ (instancetype)exceptionWithSandbox: (OFSandbox *)sandbox
errNo: (int)errNo;
- init OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
/*!
* @brief Initializes an already allocated sandboxing failed exception.
*
* @param sandbox The sandbox which could not be activated
* @param errNo The errno of the error that occurred
* @return An initialized sandboxing failed exception
*/
- initWithSandbox: (OFSandbox *)sandbox
errNo: (int)errNo OF_DESIGNATED_INITIALIZER;
- (instancetype)initWithSandbox: (OFSandbox *)sandbox
errNo: (int)errNo OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|
Modified src/exceptions/OFSandboxActivationFailedException.m
from [81ac775338]
to [ab78c8b6cf].
︙ | | |
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
-
+
-
-
+
+
|
+ (instancetype)exceptionWithSandbox: (OFSandbox *)sandbox
errNo: (int)errNo
{
return [[[self alloc] initWithSandbox: sandbox
errNo: errNo] autorelease];
}
- init
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
- initWithSandbox: (OFSandbox *)sandbox
errNo: (int)errNo
- (instancetype)initWithSandbox: (OFSandbox *)sandbox
errNo: (int)errNo
{
self = [super init];
_sandbox = [sandbox retain];
_errNo = errNo;
return self;
|
︙ | | |
Modified src/exceptions/OFSeekFailedException.h
from [fec6187850]
to [df09a3f95e].
︙ | | |
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
|
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
|
-
+
-
-
-
-
+
+
+
+
|
* @return A new, autoreleased seek failed exception
*/
+ (instancetype)exceptionWithStream: (OFSeekableStream *)stream
offset: (of_offset_t)offset
whence: (int)whence
errNo: (int)errNo;
- init OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
/*!
* @brief Initializes an already allocated seek failed exception.
*
* @param stream The stream for which seeking failed
* @param offset The offset to which seeking failed
* @param whence To what the offset is relative
* @param errNo The errno of the error that occurred
* @return An initialized seek failed exception
*/
- initWithStream: (OFSeekableStream *)stream
offset: (of_offset_t)offset
whence: (int)whence
errNo: (int)errNo OF_DESIGNATED_INITIALIZER;
- (instancetype)initWithStream: (OFSeekableStream *)stream
offset: (of_offset_t)offset
whence: (int)whence
errNo: (int)errNo OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|
Modified src/exceptions/OFSeekFailedException.m
from [61374f4d60]
to [55ff0b005f].
︙ | | |
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
-
+
-
-
-
-
+
+
+
+
|
{
return [[[self alloc] initWithStream: stream
offset: offset
whence: whence
errNo: errNo] autorelease];
}
- init
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
- initWithStream: (OFSeekableStream *)stream
offset: (of_offset_t)offset
whence: (int)whence
errNo: (int)errNo
- (instancetype)initWithStream: (OFSeekableStream *)stream
offset: (of_offset_t)offset
whence: (int)whence
errNo: (int)errNo
{
self = [super init];
_stream = [stream retain];
_offset = offset;
_whence = whence;
_errNo = errNo;
|
︙ | | |
Modified src/exceptions/OFSetOptionFailedException.h
from [017f4d3212]
to [c45c93c061].
︙ | | |
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
-
+
-
-
+
+
|
* @param stream The stream for which the option could not be set
* @param errNo The errno of the error that occurred
* @return A new, autoreleased set option failed exception
*/
+ (instancetype)exceptionWithStream: (OFStream *)stream
errNo: (int)errNo;
- init OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
/*!
* @brief Initializes an already allocated set option failed exception.
*
* @param stream The stream for which the option could not be set
* @param errNo The errno of the error that occurred
* @return An initialized set option failed exception
*/
- initWithStream: (OFStream *)stream
errNo: (int)errNo OF_DESIGNATED_INITIALIZER;
- (instancetype)initWithStream: (OFStream *)stream
errNo: (int)errNo OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|
Modified src/exceptions/OFSetOptionFailedException.m
from [d872fab5a7]
to [f6f85887fb].
︙ | | |
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
-
+
-
-
+
+
|
+ (instancetype)exceptionWithStream: (OFStream *)stream
errNo: (int)errNo
{
return [[[self alloc] initWithStream: stream
errNo: errNo] autorelease];
}
- init
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
- initWithStream: (OFStream *)stream
errNo: (int)errNo
- (instancetype)initWithStream: (OFStream *)stream
errNo: (int)errNo
{
self = [super init];
_stream = [stream retain];
_errNo = errNo;
return self;
|
︙ | | |
Modified src/exceptions/OFStatItemFailedException.h
from [1a609b0774]
to [f307ae7896].
︙ | | |
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
-
+
-
-
+
+
|
* retrieved
* @param errNo The errno of the error that occurred
* @return A new, autoreleased stat item failed exception
*/
+ (instancetype)exceptionWithPath: (OFString *)path
errNo: (int)errNo;
- init OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
/*!
* @brief Initializes an already allocated stat item failed exception.
*
* @param path A string with the path of the item whose status could not be
* retrieved
* @param errNo The errno of the error that occurred
* @return An initialized stat item failed exception
*/
- initWithPath: (OFString *)path
errNo: (int)errNo OF_DESIGNATED_INITIALIZER;
- (instancetype)initWithPath: (OFString *)path
errNo: (int)errNo OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|
Modified src/exceptions/OFStatItemFailedException.m
from [80e4300493]
to [ded2d947a2].
︙ | | |
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
|
-
+
-
-
+
+
|
+ (instancetype)exceptionWithPath: (OFString *)path
errNo: (int)errNo
{
return [[[self alloc] initWithPath: path
errNo: errNo] autorelease];
}
- init
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
- initWithPath: (OFString *)path
errNo: (int)errNo
- (instancetype)initWithPath: (OFString *)path
errNo: (int)errNo
{
self = [super init];
@try {
_path = [path copy];
_errNo = errNo;
} @catch (id e) {
|
︙ | | |
Modified src/exceptions/OFStillLockedException.h
from [b8061dbf08]
to [15a545486d].
︙ | | |
45
46
47
48
49
50
51
52
53
54
55
|
45
46
47
48
49
50
51
52
53
54
55
56
|
-
+
+
|
/*!
* @brief Initializes an already allocated still locked exception.
*
* @param lock The lock which is still locked
* @return An initialized still locked exception
*/
- initWithLock: (nullable id <OFLocking>)lock OF_DESIGNATED_INITIALIZER;
- (instancetype)initWithLock: (nullable id <OFLocking>)lock
OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|
Modified src/exceptions/OFStillLockedException.m
from [2fe383e098]
to [92ce8777a7].
︙ | | |
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
-
+
-
+
|
@synthesize lock = _lock;
+ (instancetype)exceptionWithLock: (id <OFLocking>)lock
{
return [[[self alloc] initWithLock: lock] autorelease];
}
- init
- (instancetype)init
{
return [self initWithLock: nil];
}
- initWithLock: (id <OFLocking>)lock
- (instancetype)initWithLock: (id <OFLocking>)lock
{
self = [super init];
_lock = [lock retain];
return self;
}
|
︙ | | |
Modified src/exceptions/OFThreadJoinFailedException.h
from [ee910d5685]
to [595f61afcf].
︙ | | |
50
51
52
53
54
55
56
57
58
59
60
|
50
51
52
53
54
55
56
57
58
59
60
61
|
-
+
+
|
/*!
* @brief Initializes an already allocated thread join failed exception.
*
* @param thread The thread which could not be joined
* @return An initialized thread join failed exception
*/
- initWithThread: (nullable OFThread *)thread OF_DESIGNATED_INITIALIZER;
- (instancetype)initWithThread: (nullable OFThread *)thread
OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|
Modified src/exceptions/OFThreadJoinFailedException.m
from [52418b0509]
to [d9af9e39c6].
︙ | | |
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
-
+
-
+
|
@synthesize thread = _thread;
+ (instancetype)exceptionWithThread: (OFThread *)thread
{
return [[[self alloc] initWithThread: thread] autorelease];
}
- init
- (instancetype)init
{
return [self initWithThread: nil];
}
- initWithThread: (OFThread *)thread
- (instancetype)initWithThread: (OFThread *)thread
{
self = [super init];
_thread = [thread retain];
return self;
}
|
︙ | | |
Modified src/exceptions/OFThreadStartFailedException.h
from [5b62c6914b]
to [fd6c478dd7].
︙ | | |
50
51
52
53
54
55
56
57
58
59
60
|
50
51
52
53
54
55
56
57
58
59
60
61
|
-
+
+
|
/*!
* @brief Initializes an already allocated thread start failed exception.
*
* @param thread The thread which could not be started
* @return An initialized thread start failed exception
*/
- initWithThread: (nullable OFThread *)thread OF_DESIGNATED_INITIALIZER;
- (instancetype)initWithThread: (nullable OFThread *)thread
OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|
Modified src/exceptions/OFThreadStartFailedException.m
from [15916f07c7]
to [78c3ecad5d].
︙ | | |
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
-
+
-
+
|
@synthesize thread = _thread;
+ (instancetype)exceptionWithThread: (OFThread *)thread
{
return [[[self alloc] initWithThread: thread] autorelease];
}
- init
- (instancetype)init
{
return [self initWithThread: nil];
}
- initWithThread: (OFThread *)thread
- (instancetype)initWithThread: (OFThread *)thread
{
self = [super init];
_thread = [thread retain];
return self;
}
|
︙ | | |
Modified src/exceptions/OFThreadStillRunningException.h
from [f704902e73]
to [00e790e6d8].
︙ | | |
50
51
52
53
54
55
56
57
58
59
60
|
50
51
52
53
54
55
56
57
58
59
60
61
|
-
+
+
|
/*!
* @brief Initializes an already allocated thread still running exception.
*
* @param thread The thread which is still running
* @return An initialized thread still running exception
*/
- initWithThread: (nullable OFThread *)thread OF_DESIGNATED_INITIALIZER;
- (instancetype)initWithThread: (nullable OFThread *)thread
OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|
Modified src/exceptions/OFThreadStillRunningException.m
from [72ea85d26c]
to [93abbb4a37].
︙ | | |
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
-
+
-
+
|
@synthesize thread = _thread;
+ (instancetype)exceptionWithThread: (OFThread *)thread
{
return [[[self alloc] initWithThread: thread] autorelease];
}
- init
- (instancetype)init
{
return [self initWithThread: nil];
}
- initWithThread: (OFThread *)thread
- (instancetype)initWithThread: (OFThread *)thread
{
self = [super init];
_thread = [thread retain];
return self;
}
|
︙ | | |
Modified src/exceptions/OFUnboundNamespaceException.h
from [0e5c5a1bea]
to [ea8e0b8705].
︙ | | |
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
-
+
-
-
+
+
+
|
* @param namespace_ The namespace which is unbound
* @param element The element in which the namespace was not bound
* @return A new, autoreleased unbound namespace exception
*/
+ (instancetype)exceptionWithNamespace: (OFString *)namespace_
element: (OFXMLElement *)element;
- init OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
/*!
* @brief Initializes an already allocated unbound namespace exception.
*
* @param namespace_ The namespace which is unbound
* @param element The element in which the namespace was not bound
* @return An initialized unbound namespace exception
*/
- initWithNamespace: (OFString *)namespace_
element: (OFXMLElement *)element OF_DESIGNATED_INITIALIZER;
- (instancetype)initWithNamespace: (OFString *)namespace_
element: (OFXMLElement *)element
OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|
Modified src/exceptions/OFUnboundNamespaceException.m
from [c53b196b47]
to [ceb4b14e35].
︙ | | |
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
-
+
-
-
+
+
|
+ (instancetype)exceptionWithNamespace: (OFString *)namespace
element: (OFXMLElement *)element
{
return [[[self alloc] initWithNamespace: namespace
element: element] autorelease];
}
- init
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
- initWithNamespace: (OFString *)namespace
element: (OFXMLElement *)element
- (instancetype)initWithNamespace: (OFString *)namespace
element: (OFXMLElement *)element
{
self = [super init];
@try {
_namespace = [namespace copy];
_element = [element retain];
} @catch (id e) {
|
︙ | | |
Modified src/exceptions/OFUnboundPrefixException.h
from [5e8a642c6a]
to [093083acd4].
︙ | | |
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
|
-
+
-
-
+
+
|
* @param prefix The prefix which is unbound
* @param parser The parser which encountered the unbound prefix
* @return A new, autoreleased unbound prefix exception
*/
+ (instancetype)exceptionWithPrefix: (OFString *)prefix
parser: (OFXMLParser *)parser;
- init OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
/*!
* @brief Initializes an already allocated unbound prefix exception.
*
* @param prefix The prefix which is unbound
* @param parser The parser which encountered the unbound prefix
* @return An initialized unbound prefix exception
*/
- initWithPrefix: (OFString *)prefix
parser: (OFXMLParser *)parser OF_DESIGNATED_INITIALIZER;
- (instancetype)initWithPrefix: (OFString *)prefix
parser: (OFXMLParser *)parser OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|
Modified src/exceptions/OFUnboundPrefixException.m
from [6f576c049a]
to [a31ccc390b].
︙ | | |
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
-
+
-
-
+
+
|
+ (instancetype)exceptionWithPrefix: (OFString *)prefix
parser: (OFXMLParser *)parser
{
return [[[self alloc] initWithPrefix: prefix
parser: parser] autorelease];
}
- init
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
- initWithPrefix: (OFString *)prefix
parser: (OFXMLParser *)parser
- (instancetype)initWithPrefix: (OFString *)prefix
parser: (OFXMLParser *)parser
{
self = [super init];
@try {
_prefix = [prefix copy];
_parser = [parser retain];
} @catch (id e) {
|
︙ | | |
Modified src/exceptions/OFUndefinedKeyException.h
from [8262adf7cd]
to [2cf6faae58].
︙ | | |
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
|
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
|
-
+
-
-
+
+
-
-
-
+
+
+
|
*
* @return A new, autoreleased undefined key exception
*/
+ (instancetype)exceptionWithObject: (id)object
key: (OFString *)key
value: (nullable id)value;
- init OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
/*!
* @brief Initializes an already allocated undefined key exception.
*
* @param object The object on which the key is undefined
* @param key The key which is undefined
*
* @return An initialized undefined key exception
*/
- initWithObject: (id)object
key: (OFString *)key;
- (instancetype)initWithObject: (id)object
key: (OFString *)key;
/*!
* @brief Initializes an already allocated undefined key exception.
*
* @param object The object on which the key is undefined
* @param key The key which is undefined
* @param value The value for the undefined key
*
* @return An initialized undefined key exception
*/
- initWithObject: (id)object
key: (OFString *)key
value: (nullable id)value OF_DESIGNATED_INITIALIZER;
- (instancetype)initWithObject: (id)object
key: (OFString *)key
value: (nullable id)value OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|
Modified src/exceptions/OFUndefinedKeyException.m
from [f82b50e599]
to [52d11bb131].
︙ | | |
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
|
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
|
-
+
-
-
+
+
-
-
-
+
+
+
|
value: (id)value
{
return [[[self alloc] initWithObject: object
key: key
value: value] autorelease];
}
- init
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
- initWithObject: (id)object
key: (OFString *)key
- (instancetype)initWithObject: (id)object
key: (OFString *)key
{
return [self initWithObject: object
key: key
value: nil];
}
- initWithObject: (id)object
key: (OFString *)key
value: (id)value
- (instancetype)initWithObject: (id)object
key: (OFString *)key
value: (id)value
{
self = [super init];
@try {
_object = [object retain];
_key = [key copy];
_value = [value retain];
|
︙ | | |
Modified src/exceptions/OFUnknownXMLEntityException.h
from [ed0a6b7b38]
to [2b12797bb2].
︙ | | |
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
|
-
+
-
+
+
|
* @brief Creates a new, autoreleased unknown XML entity exception.
*
* @param entityName The name of the unknown XML entity
* @return A new, autoreleased unknown XML entity exception
*/
+ (instancetype)exceptionWithEntityName: (OFString *)entityName;
- init OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
/*!
* @brief Initializes an already allocated unknown XML entity exception.
*
* @param entityName The name of the unknown XML entity
* @return An initialized unknown XML entity exception
*/
- initWithEntityName: (OFString *)entityName OF_DESIGNATED_INITIALIZER;
- (instancetype)initWithEntityName: (OFString *)entityName
OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|
Modified src/exceptions/OFUnknownXMLEntityException.m
from [107f333674]
to [a805c3514a].
︙ | | |
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
-
+
-
+
|
@synthesize entityName = _entityName;
+ (instancetype)exceptionWithEntityName: (OFString *)entityName
{
return [[[self alloc] initWithEntityName: entityName] autorelease];
}
- init
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
- initWithEntityName: (OFString *)entityName
- (instancetype)initWithEntityName: (OFString *)entityName
{
self = [super init];
@try {
_entityName = [entityName copy];
} @catch (id e) {
[self release];
|
︙ | | |
Modified src/exceptions/OFUnlockFailedException.h
from [52fd9fc107]
to [81892243b6].
︙ | | |
45
46
47
48
49
50
51
52
53
54
55
|
45
46
47
48
49
50
51
52
53
54
55
56
|
-
+
+
|
/*!
* @brief Initializes an already allocated unlock failed exception.
*
* @param lock The lock which could not be unlocked
* @return An initialized unlock failed exception
*/
- initWithLock: (nullable id <OFLocking>)lock OF_DESIGNATED_INITIALIZER;
- (instancetype)initWithLock: (nullable id <OFLocking>)lock
OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|
Modified src/exceptions/OFUnlockFailedException.m
from [2f9ac905e0]
to [6d496fdb08].
︙ | | |
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
-
+
-
+
|
@synthesize lock = _lock;
+ (instancetype)exceptionWithLock: (id <OFLocking>)lock
{
return [[[self alloc] initWithLock: lock] autorelease];
}
- init
- (instancetype)init
{
return [self initWithLock: nil];
}
- initWithLock: (id <OFLocking>)lock
- (instancetype)initWithLock: (id <OFLocking>)lock
{
self = [super init];
_lock = [lock retain];
return self;
}
|
︙ | | |
Modified src/exceptions/OFUnsupportedProtocolException.h
from [3933dc08dd]
to [36bb62c9cc].
︙ | | |
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
-
+
-
+
|
* @brief Creates a new, autoreleased unsupported protocol exception.
*
* @param URL The URL whose protocol is unsupported
* @return A new, autoreleased unsupported protocol exception
*/
+ (instancetype)exceptionWithURL: (OFURL*)URL;
- init OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
/*!
* @brief Initializes an already allocated unsupported protocol exception
*
* @param URL The URL whose protocol is unsupported
* @return An initialized unsupported protocol exception
*/
- initWithURL: (OFURL*)URL OF_DESIGNATED_INITIALIZER;
- (instancetype)initWithURL: (OFURL*)URL OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|
Modified src/exceptions/OFUnsupportedProtocolException.m
from [0553975a42]
to [604d15bbbd].
︙ | | |
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
-
+
-
+
|
}
+ (instancetype)exceptionWithURL: (OFURL *)URL
{
return [[[self alloc] initWithURL: URL] autorelease];
}
- init
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
- initWithURL: (OFURL *)URL
- (instancetype)initWithURL: (OFURL *)URL
{
self = [super init];
_URL = [URL retain];
return self;
}
|
︙ | | |
Modified src/exceptions/OFUnsupportedVersionException.h
from [cc57329772]
to [57c11262a0].
︙ | | |
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
-
+
-
+
|
* @brief Creates a new, autoreleased unsupported version exception.
*
* @param version The version which is unsupported
* @return A new, autoreleased unsupported version exception
*/
+ (instancetype)exceptionWithVersion: (OFString *)version;
- init OF_UNAVAILABLE;
- (instancetype)init OF_UNAVAILABLE;
/*!
* @brief Initializes an already allocated unsupported protocol exception.
*
* @param version The version which is unsupported
* @return An initialized unsupported version exception
*/
- initWithVersion: (OFString *)version OF_DESIGNATED_INITIALIZER;
- (instancetype)initWithVersion: (OFString *)version OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|
Modified src/exceptions/OFUnsupportedVersionException.m
from [e260d7129f]
to [4b02687dc3].
︙ | | |
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
-
+
-
+
|
}
+ (instancetype)exceptionWithVersion: (OFString *)version
{
return [[[self alloc] initWithVersion: version] autorelease];
}
- init
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
- initWithVersion: (OFString *)version
- (instancetype)initWithVersion: (OFString *)version
{
self = [super init];
@try {
_version = [version copy];
} @catch (id e) {
[self release];
|
︙ | | |
Modified src/exceptions/OFWriteFailedException.h
from [63e6e7e007]
to [38908fcba9].
︙ | | |
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
|
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
|
-
-
-
+
+
+
-
-
-
-
+
+
+
+
|
* @return A new, autoreleased write failed exception
*/
+ (instancetype)exceptionWithObject: (id)object
requestedLength: (size_t)requestedLength
bytesWritten: (size_t)bytesWritten
errNo: (int)errNo;
- initWithObject: (id)object
requestedLength: (size_t)requestedLength
errNo: (int)errNo OF_UNAVAILABLE;
- (instancetype)initWithObject: (id)object
requestedLength: (size_t)requestedLength
errNo: (int)errNo OF_UNAVAILABLE;
/*!
* @brief Initializes an already allocated write failed exception.
*
* @param object The object from which reading or to which writing failed
* @param requestedLength The requested length of the data that could not be
* read / written
* @param bytesWritten The amount of bytes already written before the write
* failed
* @param errNo The errno of the error that occurred
* @return A new open file failed exception
*/
- initWithObject: (id)object
requestedLength: (size_t)requestedLength
bytesWritten: (size_t)bytesWritten
errNo: (int)errNo OF_DESIGNATED_INITIALIZER;
- (instancetype)initWithObject: (id)object
requestedLength: (size_t)requestedLength
bytesWritten: (size_t)bytesWritten
errNo: (int)errNo OF_DESIGNATED_INITIALIZER;
@end
OF_ASSUME_NONNULL_END
|
Modified src/exceptions/OFWriteFailedException.m
from [16fd1ae620]
to [dddd9c4da4].
︙ | | |
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
|
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
|
-
-
-
+
+
+
-
-
-
-
+
+
+
+
|
{
return [[[self alloc] initWithObject: object
requestedLength: requestedLength
bytesWritten: bytesWritten
errNo: errNo] autorelease];
}
- initWithObject: (id)object
requestedLength: (size_t)requestedLength
errNo: (int)errNo
- (instancetype)initWithObject: (id)object
requestedLength: (size_t)requestedLength
errNo: (int)errNo
{
OF_INVALID_INIT_METHOD
}
- initWithObject: (id)object
requestedLength: (size_t)requestedLength
bytesWritten: (size_t)bytesWritten
errNo: (int)errNo
- (instancetype)initWithObject: (id)object
requestedLength: (size_t)requestedLength
bytesWritten: (size_t)bytesWritten
errNo: (int)errNo
{
self = [super initWithObject: object
requestedLength: requestedLength
errNo: errNo];
_bytesWritten = bytesWritten;
|
︙ | | |
Modified tests/OFArrayTests.m
from [ce6bbc2cf5]
to [4fabdad1e7].
︙ | | |
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
|
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
|
-
+
-
-
+
+
-
-
+
+
|
@interface SimpleMutableArray: OFMutableArray
{
OFMutableArray *_array;
}
@end
@implementation SimpleArray
- init
- (instancetype)init
{
self = [super init];
@try {
_array = [[OFMutableArray alloc] init];
} @catch (id e) {
[self release];
@throw e;
}
return self;
}
- initWithObject: (id)object
arguments: (va_list)arguments
- (instancetype)initWithObject: (id)object
arguments: (va_list)arguments
{
self = [super init];
@try {
_array = [[OFMutableArray alloc] initWithObject: object
arguments: arguments];
} @catch (id e) {
[self release];
@throw e;
}
return self;
}
- initWithObjects: (id const *)objects
count: (size_t)count
- (instancetype)initWithObjects: (id const *)objects
count: (size_t)count
{
self = [super init];
@try {
_array = [[OFMutableArray alloc] initWithObjects: objects
count: count];
} @catch (id e) {
|
︙ | | |
Modified tests/OFDictionaryTests.m
from [ed8d42f32f]
to [ca0fda1cc3].
︙ | | |
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
|
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
|
-
+
-
-
+
+
-
-
-
+
+
+
|
@interface SimpleMutableDictionary: OFMutableDictionary
{
OFMutableDictionary *_dictionary;
}
@end
@implementation SimpleDictionary
- init
- (instancetype)init
{
self = [super init];
@try {
_dictionary = [[OFMutableDictionary alloc] init];
} @catch (id e) {
[self release];
@throw e;
}
return self;
}
- initWithKey: (id)key
arguments: (va_list)arguments
- (instancetype)initWithKey: (id)key
arguments: (va_list)arguments
{
self = [super init];
@try {
_dictionary = [[OFMutableDictionary alloc]
initWithKey: key
arguments: arguments];
} @catch (id e) {
[self release];
@throw e;
}
return self;
}
- initWithObjects: (const id *)objects
forKeys: (const id *)keys_
count: (size_t)count
- (instancetype)initWithObjects: (const id *)objects
forKeys: (const id *)keys_
count: (size_t)count
{
self = [super init];
@try {
_dictionary = [[OFMutableDictionary alloc]
initWithObjects: objects
forKeys: keys_
|
︙ | | |
Modified tests/OFHTTPClientTests.m
from [76843d6944]
to [551e4c55ef].
︙ | | |
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
|
-
+
|
{
@public
uint16_t _port;
}
@end
@implementation HTTPClientTestsServer
- main
- (id)main
{
OFTCPSocket *listener, *client;
[cond lock];
listener = [OFTCPSocket socket];
_port = [listener bindToHost: @"127.0.0.1"
|
︙ | | |
Modified tests/OFKernelEventObserverTests.m
from [6f6df4db2e]
to [a75e0308f8].
︙ | | |
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
-
+
|
int _fails;
}
- (void)run;
@end
@implementation ObserverTest
- initWithTestsAppDelegate: (TestsAppDelegate *)testsAppDelegate
- (instancetype)initWithTestsAppDelegate: (TestsAppDelegate *)testsAppDelegate
{
self = [super init];
@try {
uint16_t port;
_testsAppDelegate = testsAppDelegate;
|
︙ | | |
Modified tests/OFStringTests.m
from [addca37143]
to [71dce1ac50].
︙ | | |
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
|
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
|
-
+
-
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
-
+
+
|
@interface SimpleMutableString: OFMutableString
{
OFMutableString *_string;
}
@end
@implementation SimpleString
- init
- (instancetype)init
{
self = [super init];
@try {
_string = [[OFMutableString alloc] init];
} @catch (id e) {
[self release];
@throw e;
}
return self;
}
- initWithString: (OFString *)string
- (instancetype)initWithString: (OFString *)string
{
self = [super init];
@try {
_string = [string mutableCopy];
} @catch (id e) {
[self release];
@throw e;
}
return self;
}
- initWithCString: (const char *)cString
encoding: (of_string_encoding_t)encoding
length: (size_t)length
- (instancetype)initWithCString: (const char *)cString
encoding: (of_string_encoding_t)encoding
length: (size_t)length
{
self = [super init];
@try {
_string = [[OFMutableString alloc] initWithCString: cString
encoding: encoding
length: length];
} @catch (id e) {
[self release];
@throw e;
}
return self;
}
- initWithUTF16String: (const char16_t *)UTF16String
length: (size_t)length
byteOrder: (of_byte_order_t)byteOrder
- (instancetype)initWithUTF16String: (const char16_t *)UTF16String
length: (size_t)length
byteOrder: (of_byte_order_t)byteOrder
{
self = [super init];
@try {
_string = [[OFMutableString alloc]
initWithUTF16String: UTF16String
length: length
byteOrder: byteOrder];
} @catch (id e) {
[self release];
@throw e;
}
return self;
}
- initWithUTF32String: (const char32_t *)UTF32String
length: (size_t)length
byteOrder: (of_byte_order_t)byteOrder
- (instancetype)initWithUTF32String: (const char32_t *)UTF32String
length: (size_t)length
byteOrder: (of_byte_order_t)byteOrder
{
self = [super init];
@try {
_string = [[OFMutableString alloc]
initWithUTF32String: UTF32String
length: length
byteOrder: byteOrder];
} @catch (id e) {
[self release];
@throw e;
}
return self;
}
- initWithFormat: (OFConstantString *)format
arguments: (va_list)arguments
- (instancetype)initWithFormat: (OFConstantString *)format
arguments: (va_list)arguments
{
self = [super init];
@try {
_string = [[OFMutableString alloc] initWithFormat: format
arguments: arguments];
} @catch (id e) {
|
︙ | | |
Modified utils/ofhttp/OFHTTP.m
from [19987f61b8]
to [7674e4cd26].
︙ | | |
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
|
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
|
-
+
|
[fileName retain];
objc_autoreleasePoolPop(pool);
return [fileName autorelease];
}
@implementation OFHTTP
- init
- (instancetype)init
{
self = [super init];
@try {
_method = OF_HTTP_REQUEST_METHOD_GET;
_clientHeaders = [[OFMutableDictionary alloc]
|
︙ | | |
Modified utils/ofhttp/ProgressBar.h
from [df943e83c1]
to [47428227ea].
︙ | | |
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
25
26
27
28
29
30
31
32
33
34
35
36
37
38
|
-
-
+
+
|
OFDate *_startDate, *_lastReceivedDate;
OFTimer *_drawTimer, *_BPSTimer;
bool _stopped;
float _BPS;
double _ETA;
}
- initWithLength: (intmax_t)length
resumedFrom: (intmax_t)resumedFrom;
- (instancetype)initWithLength: (intmax_t)length
resumedFrom: (intmax_t)resumedFrom;
- (void)setReceived: (intmax_t)received;
- (void)draw;
- (void)calculateBPSAndETA;
- (void)stop;
@end
|
Modified utils/ofhttp/ProgressBar.m
from [509373b942]
to [f1b2b790af].
︙ | | |
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
-
-
+
+
|
#define GIBIBYTE (1024 * 1024 * 1024)
#define MEBIBYTE (1024 * 1024)
#define KIBIBYTE (1024)
#define UPDATE_INTERVAL 0.1
@implementation ProgressBar
- initWithLength: (intmax_t)length
resumedFrom: (intmax_t)resumedFrom
- (instancetype)initWithLength: (intmax_t)length
resumedFrom: (intmax_t)resumedFrom
{
self = [super init];
@try {
void *pool = objc_autoreleasePoolPush();
_length = length;
|
︙ | | |
Modified utils/ofzip/Archive.h
from [c9b737aa7a]
to [ce3cd1c862].
︙ | | |
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
-
-
+
+
|
#import "OFObject.h"
#import "OFFile.h"
#import "OFArray.h"
@protocol Archive <OFObject>
+ (instancetype)archiveWithStream: (OF_KINDOF(OFStream *))stream
mode: (OFString *)mode;
- initWithStream: (OF_KINDOF(OFStream *))stream
mode: (OFString *)mode;
- (instancetype)initWithStream: (OF_KINDOF(OFStream *))stream
mode: (OFString *)mode;
- (void)listFiles;
- (void)extractFiles: (OFArray OF_GENERIC(OFString *) *)files;
- (void)printFiles: (OFArray OF_GENERIC(OFString *) *)files;
@optional
- (void)addFiles: (OFArray OF_GENERIC(OFString *) *)files;
@end
|
Modified utils/ofzip/GZIPArchive.m
from [39d718e85f]
to [c97ab3d19b].
︙ | | |
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
-
-
+
+
|
+ (instancetype)archiveWithStream: (OF_KINDOF(OFStream *))stream
mode: (OFString *)mode
{
return [[[self alloc] initWithStream: stream
mode: mode] autorelease];
}
- initWithStream: (OF_KINDOF(OFStream *))stream
mode: (OFString *)mode
- (instancetype)initWithStream: (OF_KINDOF(OFStream *))stream
mode: (OFString *)mode
{
self = [super init];
@try {
_stream = [[OFGZIPStream alloc] initWithStream: stream
mode: mode];
} @catch (id e) {
|
︙ | | |
Modified utils/ofzip/TarArchive.m
from [e256d7b4a3]
to [402b43560b].
︙ | | |
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
|
-
-
+
+
|
+ (instancetype)archiveWithStream: (OF_KINDOF(OFStream *))stream
mode: (OFString *)mode
{
return [[[self alloc] initWithStream: stream
mode: mode] autorelease];
}
- initWithStream: (OF_KINDOF(OFStream *))stream
mode: (OFString *)mode
- (instancetype)initWithStream: (OF_KINDOF(OFStream *))stream
mode: (OFString *)mode
{
self = [super init];
@try {
_archive = [[OFTarArchive alloc] initWithStream: stream
mode: mode];
} @catch (id e) {
|
︙ | | |
Modified utils/ofzip/ZIPArchive.m
from [7af801eda1]
to [6d91678c4e].
︙ | | |
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
|
-
-
+
+
|
+ (instancetype)archiveWithStream: (OF_KINDOF(OFStream *))stream
mode: (OFString *)mode
{
return [[[self alloc] initWithStream: stream
mode: mode] autorelease];
}
- initWithStream: (OF_KINDOF(OFStream *))stream
mode: (OFString *)mode
- (instancetype)initWithStream: (OF_KINDOF(OFStream *))stream
mode: (OFString *)mode
{
self = [super init];
@try {
_archive = [[OFZIPArchive alloc] initWithStream: stream
mode: mode];
} @catch (id e) {
|
︙ | | |