52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
if ((handle = dlopen([file cStringWithEncoding:
OF_STRING_ENCODING_NATIVE], RTLD_LAZY)) == NULL)
@throw [OFInitializationFailedException
exceptionWithClass: self];
[pool release];
initPlugin = (OFPlugin*(*)(void))dlsym(handle, "init_plugin");
if (initPlugin == NULL || (plugin = initPlugin()) == nil) {
dlclose(handle);
@throw [OFInitializationFailedException
exceptionWithClass: self];
}
plugin->handle = handle;
|
|
|
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
|
if ((handle = dlopen([file cStringWithEncoding:
OF_STRING_ENCODING_NATIVE], RTLD_LAZY)) == NULL)
@throw [OFInitializationFailedException
exceptionWithClass: self];
[pool release];
*(void**)&initPlugin = dlsym(handle, "init_plugin");
if (initPlugin == NULL || (plugin = initPlugin()) == nil) {
dlclose(handle);
@throw [OFInitializationFailedException
exceptionWithClass: self];
}
plugin->handle = handle;
|