ObjFW  Diff

Differences From Artifact [e2944cd61c]:

To Artifact [31c04ee022]:


234
235
236
237
238
239
240






































241
242
243
244
245
246
247
	self = [self init];

	seconds += seconds_;
	microseconds += microseconds_;

	seconds += microseconds / 1000000;
	microseconds %= 1000000;







































	return self;
}

- (BOOL)isEqual: (id)object
{
	OFDate *otherDate;







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







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
275
276
277
278
279
280
281
282
283
284
285
	self = [self init];

	seconds += seconds_;
	microseconds += microseconds_;

	seconds += microseconds / 1000000;
	microseconds %= 1000000;

	return self;
}

- initWithSerialization: (OFXMLElement*)element
{
	self = [super init];

	@try {
		OFAutoreleasePool *pool = [[OFAutoreleasePool alloc] init];
		OFXMLElement *secondsElement, *microsecondsElement;

		if (![[element name] isEqual: @"object"] ||
		    ![[element namespace] isEqual: OF_SERIALIZATION_NS] ||
		    ![[[element attributeForName: @"class"] stringValue]
		    isEqual: [isa className]])
			@throw [OFInvalidArgumentException newWithClass: isa
							       selector: _cmd];

		secondsElement = [element elementForName: @"seconds"
					       namespace: OF_SERIALIZATION_NS];
		microsecondsElement = [element
		    elementForName: @"microseconds"
			 namespace: OF_SERIALIZATION_NS];

		if (secondsElement == nil || microsecondsElement == nil)
			@throw [OFInvalidArgumentException newWithClass: isa
							       selector: _cmd];

		seconds = (int64_t)[[secondsElement stringValue] decimalValue];
		microseconds =
		    (uint32_t)[[microsecondsElement stringValue] decimalValue];

		[pool release];
	} @catch (id e) {
		[self release];
		@throw e;
	}

	return self;
}

- (BOOL)isEqual: (id)object
{
	OFDate *otherDate;