[Geany] "plugins" for plugins

Nick Treleaven nick.treleaven at xxxxx
Tue Jan 15 13:01:24 UTC 2008


On Mon, 14 Jan 2008 22:40:21 -0600
"Jeff Pohlmeyer" <yetanothergeek at gmail.com> wrote:

> On Jan 14, 2008 10:57 AM, Nick Treleaven
> <nick.treleaven at btinternet.com> wrote:
> 
> > But that was just one example of a name conflict.
> > There could be other name conflicts if more than
> > one plugin was loaded without G_MODULE_BIND_LOCAL.
> 
> Of course, any module that needs this ability should
> make some effort to avoid using symbol names that are
> likely to clash with other plugins.
[...]

Well, that might work, but it makes the plugin code quite a bit more
complex.

Instead of adding complexity to the plugin API with symbol
prefixes, maybe we could support this by only allowing one plugin to be
loaded without G_MODULE_BIND_LOCAL. Would that work?

> > Apart from naming conflicts, G_MODULE_BIND_LOCAL also
> > prevents loading a plugin that tries to access an
> > unresolved symbol.
> 
> But since we first open the plugin with this flag, if
> that fails, we certainly wouldn't try to re-open it
> without the flag.

Good point ;-)

[...]
> > Is there really no other way that the Lua plugin can
> > load those modules for itself only?
> 
> If anyone knows the answer to this, I would love to hear
> it, but I have already tried everything I could think of,
> and nothing else worked.

This would be the ideal way, but maybe it's not possible.

Another thing, could you check how other programs with plugins do
this? Pidgin has bindings for Perl and maybe some other
languages, do they use G_MODULE_BIND_LOCAL? (I'm not sure SciTE is a
good example, does it have a plugin interface?)

Regards,
Nick



More information about the Users mailing list