Skip to content

Commit 629ac4a

Browse files
committed
plugin: actually implement plugin_get_export()
1 parent 93aa17c commit 629ac4a

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

src/plugin.c

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,14 +115,23 @@ void plugin_delete(Plugin * plugin)
115115
}
116116

117117

118+
/* accessors */
119+
/* plugin_get_export */
120+
PluginExport plugin_get_export(Plugin * plugin, String const * name)
121+
{
122+
/* FIXME deprecate plugin_get_export() or plugin_lookup()? */
123+
return plugin_lookup(plugin, name);
124+
}
125+
126+
118127
/* useful */
119128
/* plugin_lookup */
120-
void * plugin_lookup(Plugin * plugin, String const * symbol)
129+
PluginExport plugin_lookup(Plugin * plugin, String const * symbol)
121130
{
122131
#ifdef __WIN32__
123132
return GetProcAddress(plugin, symbol);
124133
#else
125-
void * ret;
134+
PluginExport ret;
126135

127136
if((ret = dlsym(plugin, symbol)) == NULL)
128137
error_set_code(1, "%s", dlerror());

0 commit comments

Comments
 (0)