ObjFW  Diff

Differences From Artifact [8d4b356936]:

To Artifact [4f38b261b8]:


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
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







+
+
+
-
-
+
+

-
-
-
+
+
+

+
+
+
+
+
-
-
+
+

-
+
+
+
+
+







		seconds = tmAndTzToTime(&tm, &tz);

	return [self initWithTimeIntervalSince1970: seconds];
}

- (instancetype)initWithSerialization: (OFXMLElement *)element
{
	of_time_interval_t seconds;

	@try {
	void *pool = objc_autoreleasePoolPush();
	of_time_interval_t seconds;
		void *pool = objc_autoreleasePoolPush();
		unsigned long long value;

	if (![element.name isEqual: @"OFDate"] ||
	    ![element.namespace isEqual: OF_SERIALIZATION_NS])
		@throw [OFInvalidArgumentException exception];
		if (![element.name isEqual: @"OFDate"] ||
		    ![element.namespace isEqual: OF_SERIALIZATION_NS])
			@throw [OFInvalidArgumentException exception];

		value = [element unsignedLongLongValueWithBase: 16];

		if (value > UINT64_MAX)
			@throw [OFOutOfRangeException exception];

	seconds = OF_BSWAP_DOUBLE_IF_LE(OF_INT_TO_DOUBLE_RAW(OF_BSWAP64_IF_LE(
	    element.hexadecimalValue)));
		seconds = OF_BSWAP_DOUBLE_IF_LE(OF_INT_TO_DOUBLE_RAW(
		    OF_BSWAP64_IF_LE(value)));

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

	return [self initWithTimeIntervalSince1970: seconds];
}

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