On 14-05-20 03:38 AM, Lex Trotman wrote:
[snip]
I know it might be a bit hard to restrict some symbols, like enums
that C spits gaily into the global namespace, but if functions and
structs are limited to those intended to be available, then that will
be a big leap forward.
It should be ok if the enums are declared in private header (unless they
need to be public), then the plugins are never faced with this namespace
pollution.
None of this actually *prevents* a plugin writer using the Geany
headers to access everything, but in doing so they are alerted to the
fact that what they are using may break, or change in subtle and
incompatible ways.
It doesn't technically prevent them using private functions (on *nix),
since they can add a forward declaration if they lookup the function's
signature, but for all other uses they couldn't since the the (private)
headers would not even be installed on their systems, and for functions
it's obviously wrong to be forward-declaring private functions and
calling them anyway :)
[snip]
I'm not sure what percentage of the API this is, but if it has only
taken a looong boooring day or two to do it, then its not too bad :)
It's one small header (build.h) and two of the biggest ones (document.h
and editor.h) and it only took a couple hours, including building
geany-plugins a bunch of times to see if they broke.
Cheers,
Matthew Brush
_______________________________________________
Devel mailing list
Devel@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/devel