Branch: refs/heads/master Author: Colomban Wendling ban@herbesfolles.org Committer: Colomban Wendling ban@herbesfolles.org Date: Sun, 15 Nov 2015 00:16:22 UTC Commit: 2bee7120b0fff687a7eea641fe547c76f00bcb3e https://github.com/geany/geany/commit/2bee7120b0fff687a7eea641fe547c76f00bcb...
Log Message: ----------- Allow calls to plugin_module_make_resident() from geany_load_module()
This is useful if a plugin registers i.e. GTypes from its geany_load_module(), i.e. to implement plugin functions as GObject class methods.
The implementation can be considered a slight hack, but we need the module to be know already in geany_load_module(), which is called too early for the normal process to set it.
Closes #719.
Modified Paths: -------------- src/plugindata.h src/plugins.c
Modified: src/plugindata.h 1 lines changed, 1 insertions(+), 0 deletions(-) =================================================================== @@ -284,6 +284,7 @@ void plugin_cleanup(void); * - main_locale_init() * - geany_plugin_register() (and GEANY_PLUGIN_REGISTER()) * - geany_plugin_register_full() (and GEANY_PLUGIN_REGISTER_FULL()) + * - plugin_module_make_resident() * * @param plugin The unique plugin handle to your plugin. You must set some fields here. *
Modified: src/plugins.c 4 lines changed, 4 insertions(+), 0 deletions(-) =================================================================== @@ -613,6 +613,10 @@ static gpointer plugin_load_gmodule(GeanyPlugin *proxy, GeanyPlugin *subplugin, g_module_symbol(module, "geany_load_module", (void *) &p_geany_load_module); if (p_geany_load_module) { + /* set this here already so plugins can call i.e. plugin_module_make_resident() + * right from their geany_load_module() */ + subplugin->priv->proxy_data = module; + /* This is a new style plugin. It should fill in plugin->info and then call * geany_plugin_register() in its geany_load_module() to successfully load. * The ABI and API checks are performed by geany_plugin_register() (i.e. by us).
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).