Differences From Artifact [5175fba523]:
- File
src/OFPlugin.m
— part of check-in
[4af49a13c3]
at
2017-05-07 20:10:13
on branch trunk
— Small code style change
Casts are now written like types in variable declarations. (user: js, size: 2426) [annotate] [blame] [check-ins using]
To Artifact [5fa3fa154b]:
- File
src/OFPlugin.m
— part of check-in
[4f36894ce7]
at
2017-06-05 17:36:28
on branch trunk
— Clean up exceptions a little
This removes several initializers that omitted the errNo. Removing those
forces to think about whether there is a meaningful errNo to set instead
of just omitting it. (user: js, size: 2497) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
24 25 26 27 28 29 30 31 32 33 34 35 36 37 | #endif #import "OFPlugin.h" #import "OFString.h" #import "OFLocalization.h" #import "OFInitializationFailedException.h" typedef OFPlugin *(*init_plugin_t)(void); of_plugin_handle_t of_dlopen(OFString *path, int flags) { #ifndef OF_WINDOWS | > | 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 | #endif #import "OFPlugin.h" #import "OFString.h" #import "OFLocalization.h" #import "OFInitializationFailedException.h" #import "OFOpenItemFailedException.h" typedef OFPlugin *(*init_plugin_t)(void); of_plugin_handle_t of_dlopen(OFString *path, int flags) { #ifndef OF_WINDOWS |
︙ | ︙ | |||
72 73 74 75 76 77 78 | of_plugin_handle_t handle; init_plugin_t initPlugin; OFPlugin *plugin; path = [path stringByAppendingString: @PLUGIN_SUFFIX]; if ((handle = of_dlopen(path, OF_RTLD_LAZY)) == NULL) | | | > < > > | 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 | of_plugin_handle_t handle; init_plugin_t initPlugin; OFPlugin *plugin; path = [path stringByAppendingString: @PLUGIN_SUFFIX]; if ((handle = of_dlopen(path, OF_RTLD_LAZY)) == NULL) @throw [OFOpenItemFailedException exceptionWithPath: path mode: nil errNo: 0]; objc_autoreleasePoolPop(pool); initPlugin = (init_plugin_t)(uintptr_t)of_dlsym(handle, "init_plugin"); if (initPlugin == (init_plugin_t)0 || (plugin = initPlugin()) == nil) { of_dlclose(handle); @throw [OFInitializationFailedException exceptionWithClass: self]; } plugin->_handle = handle; return plugin; } - init { if (object_getClass(self) == [OFPlugin class]) { @try { [self doesNotRecognizeSelector: _cmd]; } @catch (id e) { [self release]; @throw e; } abort(); } return [super init]; } - (void)dealloc { |
︙ | ︙ |