From the Geany plugin website at
http://www.geany.org/manual/reference/plugindata_8h.html#a68c850fc7108c65909f4340da8c16df9
====================================================
Value:
#define PLUGIN_VERSION_CHECK ( api_required )
gint plugin_version_check(gint abi_ver) \ { \ if (abi_ver != GEANY_ABI_VERSION) \ return -1; \ return (api_required); \ }Defines a function to check the plugin is safe to load.
This performs runtime checks that try to ensure:
======================================================
- Geany ABI data types are compatible with this plugin.
- Geany sources provide the required API for this plugin.
- Parameters:
api_required The minimum API number your plugin requires. Look at the source for the value of GEANY_API_VERSION
to use if you want your plugin to require the current Geany version on your machine. You should update this value when using any new API features.
The above documentation is crap.
First, note that the macro definition describes the parameter as abi_ver. So, according to the documentation, where does the sole parameter - abi_ver - come from?
So we can skip the test
if(abi_ver blah blah)
unless somebody can answer the above question.
So that leads to the last line of code that generates stuff:
return api_required;
I eliminated superfluous parens.
As documented, this macro returns what it is passed.
And you wonder why I'm confused?
BTW, this one is
- Since:
- 0.19
_______________________________________________
Devel mailing list
Devel@lists.geany.org
https://lists.geany.org/cgi-bin/mailman/listinfo/devel