[Geany-Devel] New plugin loader mechanisms

Dimitar Zhekov dimitar.zhekov at xxxxx
Wed Mar 18 20:23:38 UTC 2015


On 18.3.2015 г. 18:42, Thomas Martitz wrote:

> - Global symbols. Plugins binaries have to export a number of global
> symbols (geany_{functions,data,plugin}, plugin_{init,...,cleanup}). This
> kind of sucks, because they pollute the global namespace (in theory).
> Luckily on unix or win32 systems this is not a problem because they can
> restrict the symbol visibility of shared libraries. It's still bad
> practice. Ideally plugins should have zero global symbols, everything
> being static or hidden to the plugin binary.

Scope contains 20 source files and 22 headers. Using static is not an 
option, and marking everything global as hidden will be cumbersome, 
ugly, and easy to miss (inexperienced plugin developers are sure to miss 
symbols).

The only practical option seems to be compiling with hidden visibility, 
and geany_load_module() should be pre-defined as exported.

> [...]
> void (*init) (GeanyPlugin *plugin, gpointer pdata);

Please make this gboolean. A plugin may have the correct API and ABI, 
but be unable to startup / initialize for some reason. For example, 
Scope requires scope.glade in the plugin data directory).

--
E-gards: Jimmy


More information about the Devel mailing list