Use "moo_module_init" in loadable modules
parent
2192b4fb6f
commit
f82cf4eb0d
|
@ -845,9 +845,8 @@ moo_plugin_read_module (GModule *module,
|
|||
g_return_val_if_fail (module != NULL, FALSE);
|
||||
g_return_val_if_fail (name != NULL, FALSE);
|
||||
|
||||
init_func_name = g_strdup_printf ("%s_init", name);
|
||||
|
||||
if (!g_module_symbol (module, init_func_name, (gpointer*) &init_func))
|
||||
if (!g_module_symbol (module, MOO_PLUGIN_INIT_FUNC_NAME,
|
||||
(gpointer*) &init_func))
|
||||
goto out;
|
||||
|
||||
if (!init_func ())
|
||||
|
|
|
@ -20,9 +20,12 @@
|
|||
G_BEGIN_DECLS
|
||||
|
||||
#define MOO_PLUGIN_PREFS_ROOT "Plugins"
|
||||
#define MOO_PLUGIN_CURRENT_VERSION 16
|
||||
#define MOO_PLUGIN_CURRENT_VERSION 17
|
||||
#define MOO_PLUGIN_DIR_BASENAME "plugins"
|
||||
|
||||
#define MOO_PLUGIN_INIT_FUNC moo_module_init
|
||||
#define MOO_PLUGIN_INIT_FUNC_NAME "moo_module_init"
|
||||
#define MOO_PLUGIN_INIT_FUNC_DECL G_MODULE_EXPORT gboolean MOO_PLUGIN_INIT_FUNC (void)
|
||||
|
||||
#define MOO_TYPE_PLUGIN (moo_plugin_get_type ())
|
||||
#define MOO_PLUGIN(object) (G_TYPE_CHECK_INSTANCE_CAST ((object), MOO_TYPE_PLUGIN, MooPlugin))
|
||||
|
|
|
@ -384,7 +384,7 @@ _moo_python_plugin_deinit (void)
|
|||
|
||||
|
||||
#ifdef MOO_PYTHON_PLUGIN
|
||||
gboolean MOO_PYTHON_INIT_FUNC (void)
|
||||
MOO_PLUGIN_INIT_FUNC_DECL
|
||||
{
|
||||
g_message ("%s: hi there", G_STRLOC);
|
||||
return _moo_python_plugin_init ();
|
||||
|
|
Loading…
Reference in New Issue