ObjFW  Diff

Differences From Artifact [948865fcb1]:

To Artifact [e061b9b24d]:


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







-
+








	return hash;
}
@end

@implementation OFProperty
@synthesize name = _name, attributes = _attributes;
@synthesize getter = _getter, setter = _setter;
@synthesize getter = _getter, setter = _setter, iVar = _iVar;

- (instancetype)init
{
	OF_INVALID_INIT_METHOD
}

#if defined(OF_OBJFW_RUNTIME)
181
182
183
184
185
186
187





188
189
190
191
192
193
194
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199







+
+
+
+
+







			@throw [OFInitializationFailedException
			    exceptionWithClass: [self class]];

		while (*attributes != '\0') {
			const char *start;

			switch (*attributes) {
			case 'T':
				while (*attributes != ',' &&
				    *attributes != '\0')
					attributes++;
				break;
			case 'R':
				_attributes |= OF_PROPERTY_READONLY;
				attributes++;
				break;
			case 'C':
				_attributes |= OF_PROPERTY_COPY;
				attributes++;
240
241
242
243
244
245
246
247
248







249
250
251





252
253
254
255
256
257
258
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







-
-
+
+
+
+
+
+
+



+
+
+
+
+







			case 'W':
				_attributes |= OF_PROPERTY_WEAK;
				attributes++;
				break;
			case 'P':
				attributes++;
				break;
			case 'T':
			case 't':
			case 'V':
				start = ++attributes;

				if (_iVar != nil)
					@throw [OFInitializationFailedException
					    exceptionWithClass: [self class]];

				while (*attributes != ',' &&
				    *attributes != '\0')
					attributes++;

				_iVar = [[OFString alloc]
				    initWithUTF8String: start
						length: attributes - start];

				break;
			default:
				@throw [OFInitializationFailedException
				    exceptionWithClass: [self class]];
			}

			if (*attributes != ',' && *attributes != '\0')
313
314
315
316
317
318
319

320
321
322

323
324
325
326
327
328
329
328
329
330
331
332
333
334
335
336
337

338
339
340
341
342
343
344
345







+


-
+







- (OFString *)description
{
	return [OFString
	    stringWithFormat: @"<%@: %@\n"
			      @"\tAttributes = 0x%03X\n"
			      @"\tGetter = %@\n"
			      @"\tSetter = %@\n"
			      @"\tiVar = %@\n"
			      @">",
			      [self class], _name, _attributes,
			      _getter, _setter];
			      _getter, _setter, _iVar];
}

- (bool)isEqual: (id)object
{
	OFProperty *otherProperty;

	if (object == self)