Modified src/OFArray.m
from [2c1ad7f305]
to [a991103c76].
︙ | | | ︙ | |
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
|
- (instancetype)initWithObjects: (id const *)objects
count: (size_t)count
{
return (id)[[OFConcreteArray alloc] initWithObjects: objects
count: count];
}
- (instancetype)retain
{
return self;
}
- (instancetype)autorelease
{
return self;
}
- (void)release
{
}
- (void)dealloc
{
OF_DEALLOC_UNSUPPORTED
}
@end
@implementation OFArray
+ (void)initialize
{
if (self == [OFArray class])
object_setClass((id)&placeholder, [OFPlaceholderArray class]);
|
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
|
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
- (instancetype)initWithObjects: (id const *)objects
count: (size_t)count
{
return (id)[[OFConcreteArray alloc] initWithObjects: objects
count: count];
}
OF_SINGLETON_METHODS
@end
@implementation OFArray
+ (void)initialize
{
if (self == [OFArray class])
object_setClass((id)&placeholder, [OFPlaceholderArray class]);
|
︙ | | | ︙ | |
Modified src/OFCharacterSet.m
from [66a03fcc07]
to [b3736a5eb2].
︙ | | | ︙ | |
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
|
}
- (instancetype)initWithRange: (OFRange)range
{
return (id)[[OFRangeCharacterSet alloc] initWithRange: range];
}
- (instancetype)retain
{
return self;
}
- (instancetype)autorelease
{
return self;
}
- (void)release
{
}
- (void)dealloc
{
OF_DEALLOC_UNSUPPORTED
}
@end
@implementation OFCharacterSet
+ (void)initialize
{
if (self == [OFCharacterSet class])
object_setClass((id)&placeholder,
|
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
|
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
}
- (instancetype)initWithRange: (OFRange)range
{
return (id)[[OFRangeCharacterSet alloc] initWithRange: range];
}
OF_SINGLETON_METHODS
@end
@implementation OFCharacterSet
+ (void)initialize
{
if (self == [OFCharacterSet class])
object_setClass((id)&placeholder,
|
︙ | | | ︙ | |
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
|
{
return [[[OFInvertedCharacterSet alloc]
initWithCharacterSet: self] autorelease];
}
@end
@implementation OFWhitespaceCharacterSet
- (instancetype)autorelease
{
return self;
}
- (instancetype)retain
{
return self;
}
- (void)release
{
}
- (unsigned int)retainCount
{
return OFMaxRetainCount;
}
- (bool)characterIsMember: (OFUnichar)character
{
switch (character) {
case 0x0009:
case 0x0020:
case 0x00A0:
case 0x1680:
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
129
130
131
132
133
134
135
136
137
138
139
140
141
142
|
{
return [[[OFInvertedCharacterSet alloc]
initWithCharacterSet: self] autorelease];
}
@end
@implementation OFWhitespaceCharacterSet
- (bool)characterIsMember: (OFUnichar)character
{
switch (character) {
case 0x0009:
case 0x0020:
case 0x00A0:
case 0x1680:
|
︙ | | | ︙ | |
191
192
193
194
195
196
197
198
|
case 0x205F:
case 0x3000:
return true;
default:
return false;
}
}
@end
|
>
>
|
155
156
157
158
159
160
161
162
163
164
|
case 0x205F:
case 0x3000:
return true;
default:
return false;
}
}
OF_SINGLETON_METHODS
@end
|
Modified src/OFColor.m
from [ef0c65555e]
to [f189109e30].
︙ | | | ︙ | |
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
#import "OFOnce.h"
#import "OFString.h"
#import "OFTaggedPointerColor.h"
@interface OFColorSingleton: OFConcreteColor
@end
@interface OFColorPlaceholder: OFColorSingleton
@end
static struct {
Class isa;
} placeholder;
#ifdef OF_OBJFW_RUNTIME
|
|
|
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
#import "OFOnce.h"
#import "OFString.h"
#import "OFTaggedPointerColor.h"
@interface OFColorSingleton: OFConcreteColor
@end
@interface OFColorPlaceholder: OFColor
@end
static struct {
Class isa;
} placeholder;
#ifdef OF_OBJFW_RUNTIME
|
︙ | | | ︙ | |
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
|
#endif
return (id)[[OFConcreteColor alloc] initWithRed: red
green: green
blue: blue
alpha: alpha];
}
@end
@implementation OFColorSingleton
- (instancetype)autorelease
{
return self;
}
- (instancetype)retain
{
return self;
}
- (void)release
{
}
- (unsigned int)retainCount
{
return OFMaxRetainCount;
}
@end
@implementation OFColor
+ (void)initialize
{
if (self == [OFColor class])
object_setClass((id)&placeholder, [OFColorPlaceholder class]);
|
>
>
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
|
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
#endif
return (id)[[OFConcreteColor alloc] initWithRed: red
green: green
blue: blue
alpha: alpha];
}
OF_SINGLETON_METHODS
@end
@implementation OFColorSingleton
OF_SINGLETON_METHODS
@end
@implementation OFColor
+ (void)initialize
{
if (self == [OFColor class])
object_setClass((id)&placeholder, [OFColorPlaceholder class]);
|
︙ | | | ︙ | |
Modified src/OFConstantString.m
from [01f4965770]
to [58e75bd4ee].
︙ | | | ︙ | |
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
|
@implementation OFConstantUTF8String
+ (instancetype)alloc
{
OF_UNRECOGNIZED_SELECTOR
}
- (instancetype)retain
{
return self;
}
- (instancetype)autorelease
{
return self;
}
- (unsigned int)retainCount
{
return OFMaxRetainCount;
}
- (void)release
{
}
- (void)dealloc
{
OF_DEALLOC_UNSUPPORTED
}
@end
@implementation OFConstantString
+ (void)load
{
#if defined(OF_APPLE_RUNTIME) && !defined(__OBJC2__)
/*
|
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
|
@implementation OFConstantUTF8String
+ (instancetype)alloc
{
OF_UNRECOGNIZED_SELECTOR
}
OF_SINGLETON_METHODS
@end
@implementation OFConstantString
+ (void)load
{
#if defined(OF_APPLE_RUNTIME) && !defined(__OBJC2__)
/*
|
︙ | | | ︙ | |
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
|
}
+ (instancetype)alloc
{
OF_UNRECOGNIZED_SELECTOR
}
- (instancetype)retain
{
return self;
}
- (instancetype)autorelease
{
return self;
}
- (unsigned int)retainCount
{
return OFMaxRetainCount;
}
- (void)release
{
}
- (void)dealloc
{
OF_DEALLOC_UNSUPPORTED
}
/*
* In all following methods, the constant string is converted to an
* OFConstantUTF8String and the message sent again.
*/
/* From protocol OFCopying */
|
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
|
}
+ (instancetype)alloc
{
OF_UNRECOGNIZED_SELECTOR
}
OF_SINGLETON_METHODS
/*
* In all following methods, the constant string is converted to an
* OFConstantUTF8String and the message sent again.
*/
/* From protocol OFCopying */
|
︙ | | | ︙ | |
Modified src/OFCountedSet.m
from [0a786b110f]
to [8d16a5d34a].
︙ | | | ︙ | |
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
|
- (instancetype)initWithObject: (id)firstObject arguments: (va_list)arguments
{
return (id)[[OFCountedMapTableSet alloc] initWithObject: firstObject
arguments: arguments];
}
- (instancetype)retain
{
return self;
}
- (instancetype)autorelease
{
return self;
}
- (void)release
{
}
- (void)dealloc
{
OF_DEALLOC_UNSUPPORTED
}
@end
@implementation OFCountedSet
+ (void)initialize
{
if (self == [OFCountedSet class])
object_setClass((id)&placeholder,
|
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
|
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
|
- (instancetype)initWithObject: (id)firstObject arguments: (va_list)arguments
{
return (id)[[OFCountedMapTableSet alloc] initWithObject: firstObject
arguments: arguments];
}
OF_SINGLETON_METHODS
@end
@implementation OFCountedSet
+ (void)initialize
{
if (self == [OFCountedSet class])
object_setClass((id)&placeholder,
|
︙ | | | ︙ | |
Modified src/OFData.m
from [caad88cdae]
to [f7d95004e7].
︙ | | | ︙ | |
120
121
122
123
124
125
126
127
128
129
130
131
132
133
|
initWithStringRepresentation: string];
}
- (instancetype)initWithBase64EncodedString: (OFString *)string
{
return (id)[[OFConcreteData alloc] initWithBase64EncodedString: string];
}
@end
@implementation OFData
+ (void)initialize
{
if (self == [OFData class])
object_setClass((id)&placeholder, [OFDataPlaceholder class]);
|
>
>
|
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
|
initWithStringRepresentation: string];
}
- (instancetype)initWithBase64EncodedString: (OFString *)string
{
return (id)[[OFConcreteData alloc] initWithBase64EncodedString: string];
}
OF_SINGLETON_METHODS
@end
@implementation OFData
+ (void)initialize
{
if (self == [OFData class])
object_setClass((id)&placeholder, [OFDataPlaceholder class]);
|
︙ | | | ︙ | |
Modified src/OFDate.m
from [93145b86e5]
to [e2edddf9dc].
︙ | | | ︙ | |
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
|
/* Time zone */
seconds += -(double)tz * 60;
return seconds;
}
@implementation OFDateSingleton
- (instancetype)autorelease
{
return self;
}
- (instancetype)retain
{
return self;
}
- (void)release
{
}
- (unsigned int)retainCount
{
return OFMaxRetainCount;
}
@end
@implementation OFDatePlaceholder
#ifdef __clang__
/* We intentionally don't call into super, so silence the warning. */
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wunknown-pragmas"
|
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
|
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
|
/* Time zone */
seconds += -(double)tz * 60;
return seconds;
}
@implementation OFDateSingleton
OF_SINGLETON_METHODS
@end
@implementation OFDatePlaceholder
#ifdef __clang__
/* We intentionally don't call into super, so silence the warning. */
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wunknown-pragmas"
|
︙ | | | ︙ | |
317
318
319
320
321
322
323
324
325
326
327
328
329
330
|
return (id)[[OFConcreteDate alloc]
initWithTimeIntervalSince1970: seconds];
}
#ifdef __clang__
# pragma clang diagnostic pop
#endif
@end
@implementation OFConcreteDate
- (instancetype)initWithTimeIntervalSince1970: (OFTimeInterval)seconds
{
self = [super initWithTimeIntervalSince1970: seconds];
|
>
>
|
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
|
return (id)[[OFConcreteDate alloc]
initWithTimeIntervalSince1970: seconds];
}
#ifdef __clang__
# pragma clang diagnostic pop
#endif
OF_SINGLETON_METHODS
@end
@implementation OFConcreteDate
- (instancetype)initWithTimeIntervalSince1970: (OFTimeInterval)seconds
{
self = [super initWithTimeIntervalSince1970: seconds];
|
︙ | | | ︙ | |
Modified src/OFDictionary.m
from [ca10e7bcfe]
to [32e0526264].
︙ | | | ︙ | |
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
|
- (instancetype)initWithKey: (id <OFCopying>)firstKey
arguments: (va_list)arguments
{
return (id)[[OFMapTableDictionary alloc] initWithKey: firstKey
arguments: arguments];
}
- (instancetype)retain
{
return self;
}
- (instancetype)autorelease
{
return self;
}
- (void)release
{
}
- (void)dealloc
{
OF_DEALLOC_UNSUPPORTED
}
@end
@implementation OFDictionary
+ (void)initialize
{
if (self == [OFDictionary class])
object_setClass((id)&placeholder,
|
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
|
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
|
- (instancetype)initWithKey: (id <OFCopying>)firstKey
arguments: (va_list)arguments
{
return (id)[[OFMapTableDictionary alloc] initWithKey: firstKey
arguments: arguments];
}
OF_SINGLETON_METHODS
@end
@implementation OFDictionary
+ (void)initialize
{
if (self == [OFDictionary class])
object_setClass((id)&placeholder,
|
︙ | | | ︙ | |
Modified src/OFFileManager.m
from [c425786752]
to [34c9baec0c].
︙ | | | ︙ | |
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
|
ofItemAtIRI: [OFIRI fileIRIWithPath: path]];
objc_autoreleasePoolPop(pool);
}
#endif
@end
@implementation OFDefaultFileManager
- (instancetype)autorelease
{
return self;
}
- (instancetype)retain
{
return self;
}
- (void)release
{
}
- (unsigned int)retainCount
{
return OFMaxRetainCount;
}
@end
@implementation OFDictionary (FileAttributes)
- (unsigned long long)fileSize
{
return [attributeForKeyOrException(self, OFFileSize)
unsignedLongLongValue];
|
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
|
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
|
ofItemAtIRI: [OFIRI fileIRIWithPath: path]];
objc_autoreleasePoolPop(pool);
}
#endif
@end
@implementation OFDefaultFileManager
OF_SINGLETON_METHODS
@end
@implementation OFDictionary (FileAttributes)
- (unsigned long long)fileSize
{
return [attributeForKeyOrException(self, OFFileSize)
unsignedLongLongValue];
|
︙ | | | ︙ | |
Modified src/OFIRI.m
from [fdb5d156bf]
to [bb77525714].
︙ | | | ︙ | |
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
|
if (character >= 0x100000 && character <= 0x10FFFD)
return true;
return false;
}
@implementation OFIRIAllowedCharacterSetBase
- (instancetype)autorelease
{
return self;
}
- (instancetype)retain
{
return self;
}
- (void)release
{
}
- (unsigned int)retainCount
{
return OFMaxRetainCount;
}
@end
@implementation OFIRIAllowedCharacterSet
- (bool)characterIsMember: (OFUnichar)character
{
if (character < CHAR_MAX && OFASCIIIsAlnum(character))
return true;
|
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
|
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
|
if (character >= 0x100000 && character <= 0x10FFFD)
return true;
return false;
}
@implementation OFIRIAllowedCharacterSetBase
OF_SINGLETON_METHODS
@end
@implementation OFIRIAllowedCharacterSet
- (bool)characterIsMember: (OFUnichar)character
{
if (character < CHAR_MAX && OFASCIIIsAlnum(character))
return true;
|
︙ | | | ︙ | |
Modified src/OFMutableArray.m
from [18c863621c]
to [5bbb4e13e7].
︙ | | | ︙ | |
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
|
- (instancetype)initWithObjects: (id const *)objects count: (size_t)count
{
return (id)[[OFConcreteMutableArray alloc] initWithObjects: objects
count: count];
}
- (instancetype)retain
{
return self;
}
- (instancetype)autorelease
{
return self;
}
- (void)release
{
}
- (void)dealloc
{
OF_DEALLOC_UNSUPPORTED
}
@end
@implementation OFMutableArray
+ (void)initialize
{
if (self == [OFMutableArray class])
object_setClass((id)&placeholder,
|
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
|
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
|
- (instancetype)initWithObjects: (id const *)objects count: (size_t)count
{
return (id)[[OFConcreteMutableArray alloc] initWithObjects: objects
count: count];
}
OF_SINGLETON_METHODS
@end
@implementation OFMutableArray
+ (void)initialize
{
if (self == [OFMutableArray class])
object_setClass((id)&placeholder,
|
︙ | | | ︙ | |
Modified src/OFMutableData.m
from [a323ede2b7]
to [bd4ea52fa8].
︙ | | | ︙ | |
109
110
111
112
113
114
115
116
117
118
119
120
121
122
|
}
- (instancetype)initWithItemSize: (size_t)itemSize capacity: (size_t)capacity
{
return (id)[[OFConcreteMutableData alloc] initWithItemSize: itemSize
capacity: capacity];
}
@end
@implementation OFMutableData
+ (void)initialize
{
if (self == [OFMutableData class])
object_setClass((id)&placeholder,
|
>
>
|
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
|
}
- (instancetype)initWithItemSize: (size_t)itemSize capacity: (size_t)capacity
{
return (id)[[OFConcreteMutableData alloc] initWithItemSize: itemSize
capacity: capacity];
}
OF_SINGLETON_METHODS
@end
@implementation OFMutableData
+ (void)initialize
{
if (self == [OFMutableData class])
object_setClass((id)&placeholder,
|
︙ | | | ︙ | |
Modified src/OFMutableDictionary.m
from [e4cbf1d035]
to [6b2bb24001].
︙ | | | ︙ | |
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
|
- (instancetype)initWithCapacity: (size_t)capacity
{
return (id)[[OFMutableMapTableDictionary alloc]
initWithCapacity: capacity];
}
- (instancetype)retain
{
return self;
}
- (instancetype)autorelease
{
return self;
}
- (void)release
{
}
- (void)dealloc
{
OF_DEALLOC_UNSUPPORTED
}
@end
@implementation OFMutableDictionary
+ (void)initialize
{
if (self == [OFMutableDictionary class])
object_setClass((id)&placeholder,
|
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
|
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
- (instancetype)initWithCapacity: (size_t)capacity
{
return (id)[[OFMutableMapTableDictionary alloc]
initWithCapacity: capacity];
}
OF_SINGLETON_METHODS
@end
@implementation OFMutableDictionary
+ (void)initialize
{
if (self == [OFMutableDictionary class])
object_setClass((id)&placeholder,
|
︙ | | | ︙ | |
Modified src/OFMutableSet.m
from [7b6fef28d7]
to [52a6d0078f].
︙ | | | ︙ | |
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
|
}
- (instancetype)initWithCapacity: (size_t)capacity
{
return (id)[[OFMutableMapTableSet alloc] initWithCapacity: capacity];
}
- (instancetype)retain
{
return self;
}
- (instancetype)autorelease
{
return self;
}
- (void)release
{
}
- (void)dealloc
{
OF_DEALLOC_UNSUPPORTED
}
@end
@implementation OFMutableSet
+ (void)initialize
{
if (self == [OFMutableSet class])
object_setClass((id)&placeholder,
|
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
|
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
|
}
- (instancetype)initWithCapacity: (size_t)capacity
{
return (id)[[OFMutableMapTableSet alloc] initWithCapacity: capacity];
}
OF_SINGLETON_METHODS
@end
@implementation OFMutableSet
+ (void)initialize
{
if (self == [OFMutableSet class])
object_setClass((id)&placeholder,
|
︙ | | | ︙ | |
Modified src/OFMutableString.m
from [5c70d53726]
to [b405469c4d].
︙ | | | ︙ | |
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
|
encoding: (OFStringEncoding)encoding
{
return (id)[[OFMutableUTF8String alloc]
initWithContentsOfIRI: IRI
encoding: encoding];
}
- (instancetype)retain
{
return self;
}
- (instancetype)autorelease
{
return self;
}
- (void)release
{
}
- (void)dealloc
{
OF_DEALLOC_UNSUPPORTED
}
@end
@implementation OFMutableString
+ (void)initialize
{
if (self == [OFMutableString class])
object_setClass((id)&placeholder,
|
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
|
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
|
encoding: (OFStringEncoding)encoding
{
return (id)[[OFMutableUTF8String alloc]
initWithContentsOfIRI: IRI
encoding: encoding];
}
OF_SINGLETON_METHODS
@end
@implementation OFMutableString
+ (void)initialize
{
if (self == [OFMutableString class])
object_setClass((id)&placeholder,
|
︙ | | | ︙ | |
Modified src/OFNotificationCenter.m
from [bec84a1cd3]
to [3787fafa30].
︙ | | | ︙ | |
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
|
userInfo: userInfo]];
objc_autoreleasePoolPop(pool);
}
@end
@implementation OFDefaultNotificationCenter
- (instancetype)autorelease
{
return self;
}
- (instancetype)retain
{
return self;
}
- (void)release
{
}
- (unsigned int)retainCount
{
return OFMaxRetainCount;
}
@end
|
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
|
379
380
381
382
383
384
385
386
387
|
userInfo: userInfo]];
objc_autoreleasePoolPop(pool);
}
@end
@implementation OFDefaultNotificationCenter
OF_SINGLETON_METHODS
@end
|
Modified src/OFNull.m
from [820a727986]
to [9a95c48990].
︙ | | | ︙ | |
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
|
- (OFData *)messagePackRepresentation
{
uint8_t type = 0xC0;
return [OFData dataWithItems: &type count: 1];
}
- (instancetype)autorelease
{
return self;
}
- (instancetype)retain
{
return self;
}
- (void)release
{
}
- (unsigned int)retainCount
{
return OFMaxRetainCount;
}
- (void)dealloc
{
OF_DEALLOC_UNSUPPORTED
}
@end
|
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
70
71
72
73
74
75
76
77
78
|
- (OFData *)messagePackRepresentation
{
uint8_t type = 0xC0;
return [OFData dataWithItems: &type count: 1];
}
OF_SINGLETON_METHODS
@end
|
Modified src/OFNumber.m
from [c9137e7e6f]
to [af557968cc].
︙ | | | ︙ | |
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
|
}
return (id)[[OFNumber of_alloc] initWithDouble: value];
}
#ifdef __clang__
# pragma clang diagnostic pop
#endif
@end
@implementation OFNumberSingleton
- (instancetype)autorelease
{
return self;
}
- (instancetype)retain
{
return self;
}
- (void)release
{
}
- (unsigned int)retainCount
{
return OFMaxRetainCount;
}
@end
#ifdef OF_OBJFW_RUNTIME
@implementation OFTaggedPointerNumber
- (const char *)objCType
{
uintptr_t value = object_getTaggedPointerValue(self);
|
>
>
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
|
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
|
}
return (id)[[OFNumber of_alloc] initWithDouble: value];
}
#ifdef __clang__
# pragma clang diagnostic pop
#endif
OF_SINGLETON_METHODS
@end
@implementation OFNumberSingleton
OF_SINGLETON_METHODS
@end
#ifdef OF_OBJFW_RUNTIME
@implementation OFTaggedPointerNumber
- (const char *)objCType
{
uintptr_t value = object_getTaggedPointerValue(self);
|
︙ | | | ︙ | |
Modified src/OFSet.m
from [4cf2dc29e8]
to [3d86fbe75e].
︙ | | | ︙ | |
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
|
- (instancetype)initWithObject: (id)firstObject arguments: (va_list)arguments
{
return (id)[[OFMapTableSet alloc] initWithObject: firstObject
arguments: arguments];
}
- (instancetype)retain
{
return self;
}
- (instancetype)autorelease
{
return self;
}
- (void)release
{
}
- (void)dealloc
{
OF_DEALLOC_UNSUPPORTED
}
@end
@implementation OFSet
+ (void)initialize
{
if (self == [OFSet class])
object_setClass((id)&placeholder, [OFSetPlaceholder class]);
|
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
|
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
- (instancetype)initWithObject: (id)firstObject arguments: (va_list)arguments
{
return (id)[[OFMapTableSet alloc] initWithObject: firstObject
arguments: arguments];
}
OF_SINGLETON_METHODS
@end
@implementation OFSet
+ (void)initialize
{
if (self == [OFSet class])
object_setClass((id)&placeholder, [OFSetPlaceholder class]);
|
︙ | | | ︙ | |
Modified src/OFString.m
from [9aebf03e60]
to [c23004791c].
︙ | | | ︙ | |
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
|
- (instancetype)initWithContentsOfIRI: (OFIRI *)IRI
encoding: (OFStringEncoding)encoding
{
return (id)[[OFUTF8String alloc] initWithContentsOfIRI: IRI
encoding: encoding];
}
- (instancetype)retain
{
return self;
}
- (instancetype)autorelease
{
return self;
}
- (void)release
{
}
- (void)dealloc
{
OF_DEALLOC_UNSUPPORTED
}
@end
@implementation OFString
+ (void)initialize
{
if (self != [OFString class])
return;
|
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
|
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
|
- (instancetype)initWithContentsOfIRI: (OFIRI *)IRI
encoding: (OFStringEncoding)encoding
{
return (id)[[OFUTF8String alloc] initWithContentsOfIRI: IRI
encoding: encoding];
}
OF_SINGLETON_METHODS
@end
@implementation OFString
+ (void)initialize
{
if (self != [OFString class])
return;
|
︙ | | | ︙ | |
Modified src/OFTaggedPointerColor.m
from [4bde7edcf4]
to [c4dd78fccc].
︙ | | | ︙ | |
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
|
*green = (float)((value >> 8) & 0xFF) / 255;
*blue = (float)(value & 0xFF) / 255;
if (alpha != NULL)
*alpha = 1;
}
- (instancetype)retain
{
return self;
}
- (instancetype)autorelease
{
return self;
}
- (void)release
{
}
- (void)dealloc
{
OF_DEALLOC_UNSUPPORTED
}
@end
#endif
|
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
|
46
47
48
49
50
51
52
53
54
55
|
*green = (float)((value >> 8) & 0xFF) / 255;
*blue = (float)(value & 0xFF) / 255;
if (alpha != NULL)
*alpha = 1;
}
OF_SINGLETON_METHODS
@end
#endif
|
Modified src/exceptions/OFAllocFailedException.m
from [35f3b6d4b6]
to [8de5460cac].
︙ | | | ︙ | |
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
|
}
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
- (instancetype)retain
{
return self;
}
- (instancetype)autorelease
{
return self;
}
- (unsigned int)retainCount
{
return OFMaxRetainCount;
}
- (void)release
{
}
- (void)dealloc
{
OF_DEALLOC_UNSUPPORTED
}
- (OFString *)description
{
return @"Allocating an object failed!";
}
@end
|
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
30
31
32
33
34
35
36
37
38
39
40
41
42
43
|
}
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
OF_SINGLETON_METHODS
- (OFString *)description
{
return @"Allocating an object failed!";
}
@end
|
Modified src/macros.h
from [4191bc0c4c]
to [50c6f2e2c4].
︙ | | | ︙ | |
405
406
407
408
409
410
411
412
413
414
415
416
417
418
|
# define OF_DEALLOC_UNSUPPORTED \
[self doesNotRecognizeSelector: _cmd]; \
\
abort(); \
\
[super dealloc]; /* Get rid of a stupid warning */
#endif
#define OF_CONSTRUCTOR(prio) \
static void __attribute__((__constructor__(prio))) \
OF_PREPROCESSOR_CONCAT(constructor, __LINE__)(void)
#define OF_DESTRUCTOR(prio) \
static void __attribute__((__destructor__(prio))) \
OF_PREPROCESSOR_CONCAT(destructor, __LINE__)(void)
|
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
|
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
|
# define OF_DEALLOC_UNSUPPORTED \
[self doesNotRecognizeSelector: _cmd]; \
\
abort(); \
\
[super dealloc]; /* Get rid of a stupid warning */
#endif
#define OF_SINGLETON_METHODS \
- (instancetype)autorelease \
{ \
return self; \
} \
\
- (instancetype)retain \
{ \
return self; \
} \
\
- (void)release \
{ \
} \
\
- (unsigned int)retainCount \
{ \
return OFMaxRetainCount; \
} \
\
- (void)dealloc \
{ \
OF_DEALLOC_UNSUPPORTED \
}
#define OF_CONSTRUCTOR(prio) \
static void __attribute__((__constructor__(prio))) \
OF_PREPROCESSOR_CONCAT(constructor, __LINE__)(void)
#define OF_DESTRUCTOR(prio) \
static void __attribute__((__destructor__(prio))) \
OF_PREPROCESSOR_CONCAT(destructor, __LINE__)(void)
|
︙ | | | ︙ | |