ObjFW  Diff

Differences From Artifact [e52e3ce382]:

To Artifact [5d759baef8]:


71
72
73
74
75
76
77







78

79
80
81
82
83
84
85
+ (id)pluginFromFile: (OFString *)path
{
	void *pool = objc_autoreleasePoolPush();
	of_plugin_handle_t handle;
	init_plugin_t initPlugin;
	OFPlugin *plugin;








	path = [path stringByAppendingString: @PLUGIN_SUFFIX];


	if ((handle = of_dlopen(path, OF_RTLD_LAZY)) == NULL)
		@throw [OFOpenItemFailedException exceptionWithPath: path
							       mode: nil
							      errNo: 0];

	objc_autoreleasePoolPop(pool);







>
>
>
>
>
>
>

>







71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
+ (id)pluginFromFile: (OFString *)path
{
	void *pool = objc_autoreleasePoolPush();
	of_plugin_handle_t handle;
	init_plugin_t initPlugin;
	OFPlugin *plugin;

#if defined(OF_MACOS)
	path = [path stringByAppendingFormat: @".bundle/Contents/MacOS/%@",
					      [path lastPathComponent]];
#elif defined(OF_IOS)
	path = [path stringByAppendingFormat: @".bundle/%@",
					      [path lastPathComponent]];
#else
	path = [path stringByAppendingString: @PLUGIN_SUFFIX];
#endif

	if ((handle = of_dlopen(path, OF_RTLD_LAZY)) == NULL)
		@throw [OFOpenItemFailedException exceptionWithPath: path
							       mode: nil
							      errNo: 0];

	objc_autoreleasePoolPop(pool);