@b4n commented on this pull request.
> @@ -60,9 +60,9 @@ G_BEGIN_DECLS */ #define GEANY_API_VERSION 239 - -/* when gtk2 and gtk3 were both supported at the same time this was used - * to prevent loading gtk2 plugins with gtk3 Geany or vice versa. */ +/* hack to have a different ABI when built with different GTK major versions + * because loading plugins linked to a different one leads to crashes. + * Only GTK3 is currently supported. */ Yeah maybe we could promote that as non-hack. For other GTK versions, it's just a matter of shifting by an additional 8 or so. That could be something like this: ```c #define GEANY_ABI_SHIFT (8 * (GTK_MAJOR_VERSION - 2)) ``` Though, I figure the shift was kind of misguided, because it doesn't make much sense to actually shift, we could just offset, and we'd loose a whole lot less values. Maybe we could change this to something like this instead: ```c /* 18360 is (72<<8) which was the actual value of the ABI while it used * shifting, minus 72 that is still added as the base ABI version. This * was with GTK3; with each newer version we move the offset by an * additional 1024 of available ABI range */ #define GEANY_ABI_OFFSET (18360 + 1024 * (GTK_MAJOR_VERSION - 3)) #define GEANY_ABI_VERSION (72 + GEANY_ABI_OFFSET) -- You are receiving this because you are subscribed to this thread. Reply to this email directly or view it on GitHub: https://github.com/geany/geany/pull/2602#discussion_r516258359
