Mercurial > pidgin.yaz
diff libgaim/plugins/perl/common/PluginPref.xs @ 15066:e53cceebebb3
[gaim-migrate @ 17849]
Update the Perl HOWTO to include working samples and various other fixes.
In order to actually do this, I had to also make some fixes to the perl bindings.
committer: Tailor Script <tailor@pidgin.im>
author | Daniel Atallah <daniel.atallah@gmail.com> |
---|---|
date | Wed, 29 Nov 2006 23:46:55 +0000 |
parents | 60b1bc8dbf37 |
children |
line wrap: on
line diff
--- a/libgaim/plugins/perl/common/PluginPref.xs Wed Nov 29 22:43:54 2006 +0000 +++ b/libgaim/plugins/perl/common/PluginPref.xs Wed Nov 29 23:46:55 2006 +0000 @@ -33,7 +33,9 @@ gaim_plugin_pref_add_choice(pref, label, choice) Gaim::PluginPref pref const char *label - gpointer choice +# Do the appropriate conversion based on the perl type specified. +# Currently only Strings and Ints will work. + gpointer choice = (SvPOKp($arg) ? SvPV($arg, PL_na) : (SvIOKp($arg) ? GINT_TO_POINTER(SvIV($arg)) : NULL)); void gaim_plugin_pref_destroy(pref)