Differences From Artifact [c3c8bcc62a]:
- File
src/OFURLHandler.m
— part of check-in
[1483709ab2]
at
2022-08-01 21:20:54
on branch trunk
— Add support for embedding files into binaries
Embedded files are available via the objfw-embedded: URL scheme. (user: js, size: 3821) [annotate] [blame] [check-ins using] [more...]
To Artifact [fd7a23df40]:
- File src/OFURLHandler.m — part of check-in [9e7f4f34b9] at 2022-08-11 20:46:11 on branch trunk — OFURLHandler: Make +[handlerForURL:] nonnull (user: js, size: 3952) [annotate] [blame] [check-ins using]
| ︙ | ︙ | |||
27 28 29 30 31 32 33 34 35 36 37 38 39 40 | #import "OFEmbeddedFileURLHandler.h" #ifdef OF_HAVE_FILES # import "OFFileURLHandler.h" #endif #if defined(OF_HAVE_SOCKETS) && defined(OF_HAVE_THREADS) # import "OFHTTPURLHandler.h" #endif static OFMutableDictionary OF_GENERIC(OFString *, OFURLHandler *) *handlers; #ifdef OF_HAVE_THREADS static OFMutex *mutex; static void releaseMutex(void) | > > | 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 |
handler = [handlers objectForKey: URL.scheme];
#ifdef OF_HAVE_THREADS
} @finally {
[mutex unlock];
}
#endif
return handler;
}
- (instancetype)init
{
OF_INVALID_INIT_METHOD
}
| > > > | 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
}
|
| ︙ | ︙ |