ObjFW  Diff

Differences From Artifact [5197d0902a]:

To Artifact [bb7c13caac]:


596
597
598
599
600
601
602


603
604
605
606
607
608
609
610
611
612
613
614
615
616



617
618
619
620
621
622
623
596
597
598
599
600
601
602
603
604
605
606

607
608
609


610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625







+
+


-



-
-






+
+
+








	return self;
}

#ifdef OF_HAVE_FILES
- (instancetype)initFileURLWithPath: (OFString *)path
{
	bool isDirectory;

	@try {
		void *pool = objc_autoreleasePoolPush();
		bool isDirectory;

		isDirectory = ([path hasSuffix: OF_PATH_DELIMITER_STRING] ||
		    [OFURLHandler_file of_directoryExistsAtPath: path]);
		self = [self initFileURLWithPath: path
				     isDirectory: isDirectory];

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

	self = [self initFileURLWithPath: path
			     isDirectory: isDirectory];

	return self;
}

- (instancetype)initFileURLWithPath: (OFString *)path
			isDirectory: (bool)isDirectory
{
674
675
676
677
678
679
680
681
682


683

684
685
686
687
688

689
690
691
692
693
694




695
696
697
698
699
700
701
676
677
678
679
680
681
682


683
684
685
686
687
688
689
690

691


692
693
694
695
696
697
698
699
700
701
702
703
704
705
706







-
-
+
+

+




-
+
-
-




+
+
+
+








	return self;
}
#endif

- (instancetype)initWithSerialization: (OFXMLElement *)element
{
	@try {
		void *pool = objc_autoreleasePoolPush();
	void *pool = objc_autoreleasePoolPush();
	OFString *stringValue;

	@try {
		if (![[element name] isEqual: [self className]] ||
		    ![[element namespace] isEqual: OF_SERIALIZATION_NS])
			@throw [OFInvalidArgumentException exception];

		self = [self initWithString: [element stringValue]];
		stringValue = [element stringValue];

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

	self = [self initWithString: stringValue];

	objc_autoreleasePoolPop(pool);

	return self;
}

- (void)dealloc
{
	[_URLEncodedScheme release];