ObjFW  Check-in [62eddf9d21]

Overview
Comment:Let the init function of the plugin autorelease it.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 62eddf9d21ac456d49f2eb1ab92dfe998e8df3b0ebdc19e2293e11e039301ef6
User & Date: js on 2009-10-01 12:44:03
Other Links: manifest | tags
Context
2009-10-01
12:44
Migration of OFPlugin tests to new testing framework. check-in: 0ad8f57b16 user: js tags: trunk
12:44
Let the init function of the plugin autorelease it. check-in: 62eddf9d21 user: js tags: trunk
07:51
Fix stupid gcc warning that only appears on OS X. check-in: 63b90ff39d user: js tags: trunk
Changes

Modified src/OFPlugin.m from [669225b91e] to [5285064f8a].

40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
	if ((init_plugin = dlsym(handle, "init_plugin")) == NULL ||
	    (plugin = init_plugin()) == nil) {
		dlclose(handle);
		@throw [OFInitializationFailedException newWithClass: self];
	}

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

- init
{
	if (isa == [OFPlugin class])
		@throw [OFNotImplementedException newWithClass: isa
						      selector: _cmd];







|







40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
	if ((init_plugin = dlsym(handle, "init_plugin")) == NULL ||
	    (plugin = init_plugin()) == nil) {
		dlclose(handle);
		@throw [OFInitializationFailedException newWithClass: self];
	}

	plugin->handle = handle;
	return plugin;
}

- init
{
	if (isa == [OFPlugin class])
		@throw [OFNotImplementedException newWithClass: isa
						      selector: _cmd];