ObjFW  Check-in [0727c9266b]

Overview
Comment:Make it more clear that +[pluginFromFile:] does not return OFPlugin*.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 0727c9266b554471c754ad6863d95a9a7a8442be9782088a2838ab555eb73f8d
User & Date: js on 2012-02-28 14:28:44
Other Links: manifest | tags
Context
2012-02-28
14:29
Don't use alloca, as it could be unsafe. check-in: 439216041b user: js tags: trunk
14:28
Make it more clear that +[pluginFromFile:] does not return OFPlugin*. check-in: 0727c9266b user: js tags: trunk
2012-02-27
23:16
Fix a missing $ in objfw-compile. check-in: a85f714779 user: js tags: trunk
Changes

Modified src/OFPlugin.h from [fdcaea100c] to [5291cd6c54].

30
31
32
33
34
35
36
37
38
39
40
41
42
43
 */
@interface OFPlugin: OFObject
{
	of_plugin_handle_t handle;
}

/**
 * \brief Loads an OFPlugin from a file.
 *
 * \param path Path to the OFPlugin file. The suffix is appended automatically.
 * \return The loaded OFPlugin
 */
+ pluginFromFile: (OFString*)path;
@end







|

|
|

|

30
31
32
33
34
35
36
37
38
39
40
41
42
43
 */
@interface OFPlugin: OFObject
{
	of_plugin_handle_t handle;
}

/**
 * \brief Loads a plugin from a file.
 *
 * \param path Path to the plugin file. The suffix is appended automatically.
 * \return The loaded plugin
 */
+ (id)pluginFromFile: (OFString*)path;
@end

Modified src/OFPlugin.m from [9c61bbf5f1] to [c2bd5da7b9].

33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#ifdef _WIN32
# define dlopen(file, mode) LoadLibrary(file)
# define dlsym(handle, symbol) GetProcAddress(handle, symbol)
# define dlclose(handle) FreeLibrary(handle)
#endif

@implementation OFPlugin
+ pluginFromFile: (OFString*)path
{
	OFAutoreleasePool *pool;
	OFMutableString *file;
	of_plugin_handle_t handle;
	OFPlugin *(*initPlugin)(void);
	OFPlugin *plugin;








|







33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#ifdef _WIN32
# define dlopen(file, mode) LoadLibrary(file)
# define dlsym(handle, symbol) GetProcAddress(handle, symbol)
# define dlclose(handle) FreeLibrary(handle)
#endif

@implementation OFPlugin
+ (id)pluginFromFile: (OFString*)path
{
	OFAutoreleasePool *pool;
	OFMutableString *file;
	of_plugin_handle_t handle;
	OFPlugin *(*initPlugin)(void);
	OFPlugin *plugin;