[Geany-Devel] Plugin API design question/change proposal

Nick Treleaven nick.treleaven at xxxxx
Wed May 21 11:24:09 UTC 2014


On 20/05/2014 10:29, Matthew Brush wrote:
> Does anyone know why the plugin API was designed to use a bunch of
> structures containing function pointers, hidden behind macros in
> geanyfunctions.h? I found the commit where this stuff was added
> initially (ie. plugin ABI 2-3) but it doesn't mention why it was done
> like this and I tried to search the mailing list archives but Gmane
> won't let me search and the other mailing list archive doesn't go back
> that far.
>
> Somebody mentioned it might be because Windows doesn't export symbols by
> default, but it still doesn't explain why this way chosen over
> explicitly exporting the symbols using
> __declspec(dllexport)/G_MODULE_EXPORT which, IIUC, does just this.

The idea was to avoid exporting private symbols, and also to avoid 
having to build the binary with any dynamic link flags. Since the Glade 
3 change, the binary has dynamic link flags anyway, so the reason for 
this is gone.

Note: It's a bit annoying that all binary symbols are exported (on some 
platforms), ideally only symbols marked with some kind of export 
attribute would be.


More information about the Devel mailing list