[geany/geany] 6c942c: Prevent plugins built against GTK2 Geany from loading in GTK3 Geany

Colomban Wendling git-noreply at xxxxx
Sun Mar 10 16:23:33 UTC 2013


Branch:      refs/heads/master
Author:      Colomban Wendling <ban at herbesfolles.org>
Committer:   Colomban Wendling <ban at herbesfolles.org>
Date:        Tue, 09 Oct 2012 11:24:42 UTC
Commit:      6c942c1436fa91c715cc90ce0d046627e75e3306
             https://github.com/geany/geany/commit/6c942c1436fa91c715cc90ce0d046627e75e3306

Log Message:
-----------
Prevent plugins built against GTK2 Geany from loading in GTK3 Geany


Modified Paths:
--------------
    src/plugindata.h

Modified: src/plugindata.h
9 files changed, 8 insertions(+), 1 deletions(-)
===================================================================
@@ -57,12 +57,19 @@
  */
 #define GEANY_API_VERSION 216
 
+/* hack to have a different ABI when built with GTK3 because loading GTK2-linked plugins
+ * with GTK3-linked Geany leads to crash */
+#if GTK_CHECK_VERSION(3, 0, 0)
+#	define GEANY_ABI_SHIFT 8
+#else
+#	define GEANY_ABI_SHIFT 0
+#endif
 /** 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 69
+#define GEANY_ABI_VERSION (69 << GEANY_ABI_SHIFT)
 
 
 /** Defines a function to check the plugin is safe to load.



--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).


More information about the Commits mailing list