ObjFW  Diff

Differences From Artifact [ce104d5d58]:

To Artifact [a03d84cb4d]:


43
44
45
46
47
48
49
50
51
52

53
54
55
56
57
58
59
	OFMutableString *file;
	of_plugin_handle_t handle;
	OFPlugin *(*initPlugin)();
	OFPlugin *plugin;

	pool = [[OFAutoreleasePool alloc] init];
	file = [OFMutableString stringWithString: path];
	[file appendCString: PLUGIN_SUFFIX];

	if ((handle = dlopen([file cString], RTLD_LAZY)) == NULL)

		@throw [OFInitializationFailedException newWithClass: self];

	[pool release];

	initPlugin = (OFPlugin*(*)())dlsym(handle, "init_plugin");
	if (initPlugin == NULL || (plugin = initPlugin()) == nil) {
		dlclose(handle);







|

|
>







43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
	OFMutableString *file;
	of_plugin_handle_t handle;
	OFPlugin *(*initPlugin)();
	OFPlugin *plugin;

	pool = [[OFAutoreleasePool alloc] init];
	file = [OFMutableString stringWithString: path];
	[file appendString: @PLUGIN_SUFFIX];

	if ((handle = dlopen([file cStringWithEncoding:
	    OF_STRING_ENCODING_NATIVE], RTLD_LAZY)) == NULL)
		@throw [OFInitializationFailedException newWithClass: self];

	[pool release];

	initPlugin = (OFPlugin*(*)())dlsym(handle, "init_plugin");
	if (initPlugin == NULL || (plugin = initPlugin()) == nil) {
		dlclose(handle);