ObjFW  Diff

Differences From Artifact [09ba4acbc4]:

To Artifact [b29dc94d62]:


15
16
17
18
19
20
21

22

23
24

25
26
27
28
29
30
31
 * file.
 */

#import "OFValue.h"
#import "OFMethodSignature.h"
#import "OFString.h"
#import "OFValue_bytes.h"

#import "OFValue_nonretainedObject.h"

#import "OFValue_pointer.h"
#import "OFValue_range.h"


#import "OFOutOfMemoryException.h"

static struct {
	Class isa;
} placeholder;








>

>


>







15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
 * file.
 */

#import "OFValue.h"
#import "OFMethodSignature.h"
#import "OFString.h"
#import "OFValue_bytes.h"
#import "OFValue_dimension.h"
#import "OFValue_nonretainedObject.h"
#import "OFValue_point.h"
#import "OFValue_pointer.h"
#import "OFValue_range.h"
#import "OFValue_rectangle.h"

#import "OFOutOfMemoryException.h"

static struct {
	Class isa;
} placeholder;

51
52
53
54
55
56
57















58
59
60
61
62
63
64
	    initWithNonretainedObject: object];
}

- (instancetype)initWithRange: (of_range_t)range
{
	return (id)[[OFValue_range alloc] initWithRange: range];
}















@end

@implementation OFValue
+ (void)initialize
{
	if (self == [OFValue class])
		placeholder.isa = [OFValue_placeholder class];







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







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
	    initWithNonretainedObject: object];
}

- (instancetype)initWithRange: (of_range_t)range
{
	return (id)[[OFValue_range alloc] initWithRange: range];
}

- (instancetype)initWithPoint: (of_point_t)point
{
	return (id)[[OFValue_point alloc] initWithPoint: point];
}

- (instancetype)initWithDimension: (of_dimension_t)dimension
{
	return (id)[[OFValue_dimension alloc] initWithDimension: dimension];
}

- (instancetype)initWithRectangle: (of_rectangle_t)rectangle
{
	return (id)[[OFValue_rectangle alloc] initWithRectangle: rectangle];
}
@end

@implementation OFValue
+ (void)initialize
{
	if (self == [OFValue class])
		placeholder.isa = [OFValue_placeholder class];
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
	return [[[self alloc] initWithNonretainedObject: object] autorelease];
}

+ (instancetype)valueWithRange: (of_range_t)range
{
	return [[[self alloc] initWithRange: range] autorelease];
}
















- (instancetype)initWithBytes: (const void *)bytes
		     objCType: (const char *)objCType
{
	OF_INVALID_INIT_METHOD
}

- (instancetype)initWithPointer: (const void *)pointer
{
	OF_INVALID_INIT_METHOD
}

- (instancetype)initWithNonretainedObject: (id)object
{
	OF_INVALID_INIT_METHOD
}

- (instancetype)initWithRange: (of_range_t)range
{















	OF_INVALID_INIT_METHOD
}

- (bool)isEqual: (id)object
{
	const char *objCType;
	size_t size;







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>



















>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







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
	return [[[self alloc] initWithNonretainedObject: object] autorelease];
}

+ (instancetype)valueWithRange: (of_range_t)range
{
	return [[[self alloc] initWithRange: range] autorelease];
}

+ (instancetype)valueWithPoint: (of_point_t)point
{
	return [[[self alloc] initWithPoint: point] autorelease];
}

+ (instancetype)valueWithDimension: (of_dimension_t)dimension
{
	return [[[self alloc] initWithDimension: dimension] autorelease];
}

+ (instancetype)valueWithRectangle: (of_rectangle_t)rectangle
{
	return [[[self alloc] initWithRectangle: rectangle] autorelease];
}

- (instancetype)initWithBytes: (const void *)bytes
		     objCType: (const char *)objCType
{
	OF_INVALID_INIT_METHOD
}

- (instancetype)initWithPointer: (const void *)pointer
{
	OF_INVALID_INIT_METHOD
}

- (instancetype)initWithNonretainedObject: (id)object
{
	OF_INVALID_INIT_METHOD
}

- (instancetype)initWithRange: (of_range_t)range
{
	OF_INVALID_INIT_METHOD
}

- (instancetype)initWithPoint: (of_point_t)point
{
	OF_INVALID_INIT_METHOD
}

- (instancetype)initWithDimension: (of_dimension_t)dimension
{
	OF_INVALID_INIT_METHOD
}

- (instancetype)initWithRectangle: (of_rectangle_t)rectangle
{
	OF_INVALID_INIT_METHOD
}

- (bool)isEqual: (id)object
{
	const char *objCType;
	size_t size;
216
217
218
219
220
221
222






























223
224
225
226
227
228
229

	return ret;
}

- (of_range_t)rangeValue
{
	of_range_t ret;































	[self getValue: &ret
		  size: sizeof(ret)];

	return ret;
}








>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







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

	return ret;
}

- (of_range_t)rangeValue
{
	of_range_t ret;

	[self getValue: &ret
		  size: sizeof(ret)];

	return ret;
}

- (of_point_t)pointValue
{
	of_point_t ret;

	[self getValue: &ret
		  size: sizeof(ret)];

	return ret;
}

- (of_dimension_t)dimensionValue
{
	of_dimension_t ret;

	[self getValue: &ret
		  size: sizeof(ret)];

	return ret;
}

- (of_rectangle_t)rectangleValue
{
	of_rectangle_t ret;

	[self getValue: &ret
		  size: sizeof(ret)];

	return ret;
}