[Geany-devel] supporting multiple API versions

Nick Treleaven nick.treleaven at xxxxx
Mon Nov 22 16:35:29 UTC 2010

On Wed, 17 Nov 2010 01:34:26 +0100
Colomban Wendling <lists.ban at herbesfolles.org> wrote:

> I personally think that protecting code with something like
>   ...
>   #endif
> is enough.

I also think compile time checks are enough. I've just made
GEANY_API_VERSION a preprocessor macro so you can say:


> Saying this makes me remember that Geany uses a macro for each function
> in the plugin API, so it is actually already possible to do a similar check:
>   #ifdef a_geany_function
>   ...
>   #endif

That would work, but is less formal.


More information about the Devel mailing list