ObjFW  Check-in [45f72a3f13]

Overview
Comment:OFPlugin: Adjust to having proper .bundles now
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 45f72a3f1396085d6e311a685cec21f8696f47cdca342742a870d6c704cbc47f
User & Date: js on 2018-02-07 21:11:16
Other Links: manifest | tags
Context
2018-02-07
22:57
Link tests against .framework if available check-in: 956b3fa6b4 user: js tags: trunk
21:11
OFPlugin: Adjust to having proper .bundles now check-in: 45f72a3f13 user: js tags: trunk
21:07
Update buildsys check-in: a31ef8bcfc user: js tags: trunk
Changes

Modified src/OFPlugin.m from [e52e3ce382] to [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);