On 14-05-21 04:24 AM, Nick Treleaven wrote:
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.


Thanks for the info!

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.


Yeah, this might not be too tough, using a symbol listing file or `-fvisibility=hidden` or such.

Cheers,
Matthew Brush
_______________________________________________
Devel mailing list
Devel@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/devel

Reply via email to