ObjFW  Check-in [5df8f61fe4]

Overview
Comment:Return plugins autoreleased in OFPlugin.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 5df8f61fe4d18b19746e4e19d27009aa1b0a232d9c9f65e6dc19989d72e3a421
User & Date: js on 2009-06-09 23:33:08
Other Links: manifest | tags
Context
2009-06-10
00:02
Autorelease array returned in -[splitWithDelimiter] properly. check-in: a0b7eb7a66 user: js tags: trunk
2009-06-09
23:33
Return plugins autoreleased in OFPlugin. check-in: 5df8f61fe4 user: js tags: trunk
23:28
Update the dtable so we can replace methods at runtime. check-in: c70922ee1c user: js tags: trunk
Changes

Modified src/OFPlugin.m from [fccb9d70a0] to [81e7a99874].

48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
	if ((init_plugin = dlsym(handle, "init_plugin")) == NULL ||
	    (plugin = init_plugin()) == nil) {
		dlclose(handle);
		@throw [OFInitializationFailedException newWithClass: self];
	}

	plugin->handle = handle;
	return plugin;
}

- (void)dealloc
{
	dlclose(handle);

	[super dealloc];
}
@end







|









48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
	if ((init_plugin = dlsym(handle, "init_plugin")) == NULL ||
	    (plugin = init_plugin()) == nil) {
		dlclose(handle);
		@throw [OFInitializationFailedException newWithClass: self];
	}

	plugin->handle = handle;
	return [plugin autorelease];
}

- (void)dealloc
{
	dlclose(handle);

	[super dealloc];
}
@end