ObjFW  Diff

Differences From Artifact [c3c8bcc62a]:

To Artifact [fd7a23df40]:


27
28
29
30
31
32
33


34
35
36
37
38
39
40
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42







+
+







#import "OFEmbeddedFileURLHandler.h"
#ifdef OF_HAVE_FILES
# import "OFFileURLHandler.h"
#endif
#if defined(OF_HAVE_SOCKETS) && defined(OF_HAVE_THREADS)
# import "OFHTTPURLHandler.h"
#endif

#import "OFUnsupportedProtocolException.h"

static OFMutableDictionary OF_GENERIC(OFString *, OFURLHandler *) *handlers;
#ifdef OF_HAVE_THREADS
static OFMutex *mutex;

static void
releaseMutex(void)
105
106
107
108
109
110
111



112
113
114
115
116
117
118
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123







+
+
+







		handler = [handlers objectForKey: URL.scheme];
#ifdef OF_HAVE_THREADS
	} @finally {
		[mutex unlock];
	}
#endif

	if (handler == nil)
		@throw [OFUnsupportedProtocolException exceptionWithURL: URL];

	return handler;
}

- (instancetype)init
{
	OF_INVALID_INIT_METHOD
}