changeset 24912:b97d8001402d

merge of '5f39c0c7a9b42095bfdc5a3a637fc280da38d729' and '8e99bf9be800f9578d7e94cc4d522d435cfc80dd'
author Etan Reisner <pidgin@unreliablesource.net>
date Wed, 07 Jan 2009 02:59:36 +0000
parents 533d37757363 (diff) 6a1f8309c805 (current diff)
children 7bc52fed6fdb
files
diffstat 5 files changed, 49 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog.API	Wed Jan 07 02:12:17 2009 +0000
+++ b/ChangeLog.API	Wed Jan 07 02:59:36 2009 +0000
@@ -1,5 +1,11 @@
 Pidgin and Finch: The Pimpin' Penguin IM Clients That're Good for the Soul
 
+version 2.5.4 (??/??/????):
+	perl:
+		Changed:
+		* Purple::PluginPref->get_bounds no longer takes two integer
+		  arguments it now returns two integers.
+
 version 2.5.3 (12/20/2008):
 	libpurple
 		Changed:
--- a/configure.ac	Wed Jan 07 02:12:17 2009 +0000
+++ b/configure.ac	Wed Jan 07 02:59:36 2009 +0000
@@ -2285,6 +2285,30 @@
         AC_DEFINE(HAVE_TM_GMTOFF, 1, [Define if you have a tm_gmtoff member in struct tm])
 fi
 
+AC_CACHE_CHECK([whether va_lists can be copied by value], ac_cv_va_val_copy,[
+	AC_TRY_RUN([#include <stdarg.h>
+#include <stdlib.h>
+	void f (int i, ...) {
+	va_list args1, args2;
+	va_start (args1, i);
+	args2 = args1;
+	if (va_arg (args2, int) != 42 || va_arg (args1, int) != 42)
+	  exit (1);
+	va_end (args1); va_end (args2);
+	}
+	int main() {
+	  f (0, 42);
+	  return 0;
+	}],
+	[ac_cv_va_val_copy=yes],
+	[ac_cv_va_val_copy=no],
+	[ac_cv_va_val_copy=yes])
+])
+
+if test "x$ac_cv_va_val_copy" = "xno"; then
+	AC_DEFINE(VA_COPY_AS_ARRAY, 1, ['va_lists' cannot be copied as values])
+fi
+
 dnl #######################################################################
 dnl # Check for check
 dnl #######################################################################
--- a/libpurple/plugins/perl/common/PluginPref.xs	Wed Jan 07 02:12:17 2009 +0000
+++ b/libpurple/plugins/perl/common/PluginPref.xs	Wed Jan 07 02:59:36 2009 +0000
@@ -70,10 +70,16 @@
 
 
 void
-purple_plugin_pref_get_bounds(pref, min, max)
+purple_plugin_pref_get_bounds(pref, OUTLIST int min, OUTLIST int max)
 	Purple::PluginPref pref
-	int *min
-	int *max
+	# According to the perlxs manual page we shouldn't need to specify a
+	# prototype here because "[p]arameters preceded by OUTLIST keyword do
+	# not appear in the usage signature of the generated Perl function."
+	# however that appears to only work for the usage error message and
+	# not for the call to newXSproto. Since I can't find any documentation
+	# for newXSproto at the moment I have no idea if that matters so
+	# override the prototype here.
+	PROTOTYPE: $
 
 void
 purple_plugin_pref_get_choices(pref)
--- a/libpurple/plugins/perl/perl-handlers.c	Wed Jan 07 02:12:17 2009 +0000
+++ b/libpurple/plugins/perl/perl-handlers.c	Wed Jan 07 02:59:36 2009 +0000
@@ -289,14 +289,18 @@
 	PUSHMARK(sp);
 
 	purple_signal_get_values(handler->instance, handler->signal,
-	                       &ret_value, &value_count, &values);
+	                         &ret_value, &value_count, &values);
 
 	sv_args   = g_new(SV *,    value_count);
 	copy_args = g_new(void **, value_count);
 
 	for (i = 0; i < value_count; i++) {
 		sv_args[i] = purple_perl_sv_from_vargs(values[i],
+#ifdef VA_COPY_AS_ARRAY
+		                                       args,
+#else
 		                                       (va_list*)&args,
+#endif
 		                                       &copy_args[i]);
 
 		XPUSHs(sv_args[i]);
--- a/pidgin/plugins/notify.c	Wed Jan 07 02:12:17 2009 +0000
+++ b/pidgin/plugins/notify.c	Wed Jan 07 02:59:36 2009 +0000
@@ -555,9 +555,12 @@
 }
 
 static void
-handle_urgent(PidginWindow *win, gboolean set)
+handle_urgent(PidginWindow *purplewin, gboolean set)
 {
-	pidgin_set_urgent(GTK_WINDOW(win->window), set);
+	g_return_if_fail(purplewin != NULL);
+	g_return_if_fail(purplewin->window != NULL);
+
+	pidgin_set_urgent(GTK_WINDOW(purplewin->window), set);
 }
 
 static void