Revision: 5423 http://geany.svn.sourceforge.net/geany/?rev=5423&view=rev Author: ntrel Date: 2010-11-22 16:30:44 +0000 (Mon, 22 Nov 2010)
Log Message: ----------- Make GEANY_API_VERSION, GEANY_ABI_VERSION macros instead of enums so you can protect code with '#if GEANY_API_VERSION >= 200'.
Modified Paths: -------------- trunk/ChangeLog trunk/src/plugindata.h
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2010-11-22 13:49:38 UTC (rev 5422) +++ trunk/ChangeLog 2010-11-22 16:30:44 UTC (rev 5423) @@ -8,6 +8,9 @@ sidebar if there are no plugin tabs. Don't hide the sidebar on startup if only plugin tabs are visible (fixes #3101867). + * src/plugindata.h: + Make GEANY_API_VERSION, GEANY_ABI_VERSION macros instead of enums + so you can protect code with '#if GEANY_API_VERSION >= 200'.
2010-11-21 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/src/plugindata.h =================================================================== --- trunk/src/plugindata.h 2010-11-22 13:49:38 UTC (rev 5422) +++ trunk/src/plugindata.h 2010-11-22 16:30:44 UTC (rev 5423) @@ -43,21 +43,16 @@ #include "editor.h" /* GeanyIndentType */
-/* Note: We use enum instead of 'static const gint' to allow its use in global variable - * initializing, otherwise we get errors like: - * error: initializer element is not constant */ -/** Versioning data */ -enum { - /** The Application Programming Interface (API) version, incremented - * whenever any plugin data types are modified or appended to. */ - GEANY_API_VERSION = 199, +/** The Application Programming Interface (API) version, incremented + * whenever any plugin data types are modified or appended to. */ +#define GEANY_API_VERSION 200
- /** The Application Binary Interface (ABI) version, incremented whenever - * existing fields in the plugin data types have to be changed or reordered. */ - /* This should usually stay the same if fields are only appended, assuming only pointers to - * structs and not structs themselves are declared by plugins. */ - GEANY_ABI_VERSION = 68 -}; +/** The Application Binary Interface (ABI) version, incremented whenever + * existing fields in the plugin data types have to be changed or reordered. + * Changing this forces all plugins to be recompiled before Geany can load them. */ +/* This should usually stay the same if fields are only appended, assuming only pointers to + * structs and not structs themselves are declared by plugins. */ +#define GEANY_ABI_VERSION 68
/** Defines a function to check the plugin is safe to load.
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.