[Geany-devel] supporting multiple API versions
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
> #if GEANY_CHECK_API_VERSION(421)
> is enough.
I also think compile time checks are enough. I've just made
GEANY_API_VERSION a preprocessor macro so you can say:
#if GEANY_API_VERSION >= 200
> 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
That would work, but is less formal.
More information about the Devel