Make Purple::PluginPref->get_bounds be more perl-like.

Tue, 06 Jan 2009 05:36:39 +0000

author
Etan Reisner <deryni@pidgin.im>
date
Tue, 06 Jan 2009 05:36:39 +0000
changeset 25380
7f73ff8b8b81
parent 25361
bc96fa7224fd
child 25381
9a510397bf31

Make Purple::PluginPref->get_bounds be more perl-like.

It no longer expects to be called as:
$ppref->get_bounds($min, $max)
or
$ppref->get_bounds(\$min, \$max)
(I'm not even sure which one of those was intended to be correct, but
apparently they both crash.)

It now expects to be called like this:
my ($min, $max) = $ppref->get_bounds();

ChangeLog.API file | annotate | diff | comparison | revisions
libpurple/plugins/perl/common/PluginPref.xs file | annotate | diff | comparison | revisions
--- a/ChangeLog.API	Tue Jan 06 05:03:18 2009 +0000
+++ b/ChangeLog.API	Tue Jan 06 05:36:39 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/libpurple/plugins/perl/common/PluginPref.xs	Tue Jan 06 05:03:18 2009 +0000
+++ b/libpurple/plugins/perl/common/PluginPref.xs	Tue Jan 06 05:36:39 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)

mercurial