/soc/2013/ankitkv/gobjectification: ffa06ea2a4f8: Added PURPLE_A...

Ankit Vani a at nevitus.org
Mon Aug 5 08:20:06 EDT 2013


Changeset: ffa06ea2a4f8427ce0420c1f890b196d155455c4
Author:	 Ankit Vani <a at nevitus.org>
Date:	 2013-08-05 17:49 +0530
Branch:	 soc.2013.gobjectification.plugins
URL: https://hg.pidgin.im/soc/2013/ankitkv/gobjectification/rev/ffa06ea2a4f8

Description:

Added PURPLE_ABI_VERSION macro to use for the "abi_version" property of PurplePluginInfo

diffstat:

 libpurple/plugins.c |  1 -
 libpurple/plugins.h |  9 +++++++++
 2 files changed, 9 insertions(+), 1 deletions(-)

diffs (37 lines):

diff --git a/libpurple/plugins.c b/libpurple/plugins.c
--- a/libpurple/plugins.c
+++ b/libpurple/plugins.c
@@ -24,7 +24,6 @@
 #include "core.h"
 #include "debug.h"
 #include "plugins.h"
-#include "version.h"
 
 #define PURPLE_PLUGIN_INFO_GET_PRIVATE(obj) \
 	(G_TYPE_INSTANCE_GET_PRIVATE((obj), PURPLE_TYPE_PLUGIN_INFO, PurplePluginInfoPrivate))
diff --git a/libpurple/plugins.h b/libpurple/plugins.h
--- a/libpurple/plugins.h
+++ b/libpurple/plugins.h
@@ -36,6 +36,8 @@
 #include <glib-object.h>
 #endif
 
+#include "version.h"
+
 /** Returns an ABI version to set in plugins using major and minor versions */
 #define PURPLE_PLUGIN_ABI_VERSION(major,minor) ((major << 16) + minor)
 /** Returns the major version from an ABI version */
@@ -43,6 +45,13 @@
 /** Returns the minor version from an ABI version */
 #define PURPLE_PLUGIN_ABI_MINOR_VERSION(abi)   (abi & 0xFFFF)
 
+/**
+  * A convenience‎ macro that returns an ABI version using PURPLE_MAJOR_VERSION
+  * and PURPLE_MINOR_VERSION
+  */
+#define PURPLE_ABI_VERSION PURPLE_PLUGIN_ABI_VERSION(PURPLE_MAJOR_VERSION,\
+                                                     PURPLE_MINOR_VERSION)
+
 #ifdef PURPLE_PLUGINS
 
 #define PURPLE_TYPE_PLUGIN             GPLUGIN_TYPE_PLUGIN



More information about the Commits mailing list