35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
size: pathlen +
suffixlen + 1];
}
memcpy(file, [path cString], pathlen);
memcpy(file + pathlen, PLUGIN_SUFFIX, suffixlen);
file[pathlen + suffixlen] = 0;
if ((handle = dlopen(file, RTLD_NOW)) == NULL) {
free(file);
@throw [OFInitializationFailedException newWithClass: self];
}
free(file);
if ((init_plugin = dlsym(handle, "init_plugin")) == NULL ||
(plugin = init_plugin()) == nil) {
|
|
|
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
|
size: pathlen +
suffixlen + 1];
}
memcpy(file, [path cString], pathlen);
memcpy(file + pathlen, PLUGIN_SUFFIX, suffixlen);
file[pathlen + suffixlen] = 0;
if ((handle = dlopen(file, RTLD_LAZY)) == NULL) {
free(file);
@throw [OFInitializationFailedException newWithClass: self];
}
free(file);
if ((init_plugin = dlsym(handle, "init_plugin")) == NULL ||
(plugin = init_plugin()) == nil) {
|