changeset 23593:8c2650fb7253

Allow macros in the plugin name when compiling statically. Patch from Felipe Contreras. Reference: http://tinyurl.com/5ceegl
author Evan Schoenberg <evan.s@dreskin.net>
date Tue, 15 Jul 2008 17:21:17 +0000
parents 3249c367577b
children e216872e6c8a
files libpurple/plugin.h
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/plugin.h	Tue Jul 15 01:42:01 2008 +0000
+++ b/libpurple/plugin.h	Tue Jul 15 17:21:17 2008 +0000
@@ -199,9 +199,10 @@
  * Handles the initialization of modules.
  */
 #if !defined(PURPLE_PLUGINS) || defined(PURPLE_STATIC_PRPL)
+# define _FUNC_NAME(x) purple_init_##x##_plugin
 # define PURPLE_INIT_PLUGIN(pluginname, initfunc, plugininfo) \
-	gboolean purple_init_##pluginname##_plugin(void);\
-	gboolean purple_init_##pluginname##_plugin(void) { \
+	gboolean _FUNC_NAME(pluginname)(void);\
+	gboolean _FUNC_NAME(pluginname)(void) { \
 		PurplePlugin *plugin = purple_plugin_new(TRUE, NULL); \
 		plugin->info = &(plugininfo); \
 		initfunc((plugin)); \