@@ -31,11 +31,11 @@ #import "OFLoadPluginFailedException.h" typedef OFPlugin *(*init_plugin_t)(void); OFPluginHandle -OFDlOpen(OFString *path, int flags) +OFDLOpen(OFString *path, OFDLOpenFlags flags) { #ifndef OF_WINDOWS return dlopen([path cStringWithEncoding: [OFLocale encoding]], flags); #else if (path == nil) @@ -48,31 +48,31 @@ [path cStringWithEncoding: [OFLocale encoding]]); #endif } void * -OFDlSym(OFPluginHandle handle, const char *symbol) +OFDLSym(OFPluginHandle handle, const char *symbol) { #ifndef OF_WINDOWS return dlsym(handle, symbol); #else return (void *)(uintptr_t)GetProcAddress(handle, symbol); #endif } void -OFDlClose(OFPluginHandle handle) +OFDLClose(OFPluginHandle handle) { #ifndef OF_WINDOWS dlclose(handle); #else FreeLibrary(handle); #endif } OFString * -OFDlError(void) +OFDLError(void) { #ifndef OF_WINDOWS return [OFString stringWithCString: dlerror() encoding: [OFLocale encoding]]; #else @@ -96,20 +96,20 @@ path.lastPathComponent]; #else path = [path stringByAppendingString: @PLUGIN_SUFFIX]; #endif - if ((handle = OFDlOpen(path, OF_RTLD_LAZY)) == NULL) + if ((handle = OFDLOpen(path, OFDLOpenFlagLazy)) == NULL) @throw [OFLoadPluginFailedException exceptionWithPath: path - error: OFDlError()]; + error: OFDLError()]; objc_autoreleasePoolPop(pool); - initPlugin = (init_plugin_t)(uintptr_t)OFDlSym(handle, "init_plugin"); + initPlugin = (init_plugin_t)(uintptr_t)OFDLSym(handle, "init_plugin"); if (initPlugin == (init_plugin_t)0 || (plugin = initPlugin()) == nil) { - OFDlClose(handle); + OFDLClose(handle); @throw [OFInitializationFailedException exceptionWithClass: self]; } plugin->_pluginHandle = handle; @@ -136,8 +136,8 @@ { OFPluginHandle h = _pluginHandle; [super dealloc]; - OFDlClose(h); + OFDLClose(h); } @end